ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 25 Aug 2022 13:26:40 +0200how to import a function in another filehttps://ask.sagemath.org/question/63770/how-to-import-a-function-in-another-file/In python it's easy to find how can I do:
from file import func1, func2, func3
But I couldn't do in jupyter notebook. It didn't read the file.
For example dag is an function in sample_code ;
import ipynb
from ipynb.fs.full.sample_code import dag
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-3-cb32ddc8df9f> in <module>
----> 1 import ipynb
2 from ipynb.fs.full.sample_code import dag
ModuleNotFoundError: No module named 'ipynb'
Thanks for advance.SuleThu, 25 Aug 2022 13:26:40 +0200https://ask.sagemath.org/question/63770/manage my functions in SAGEhttps://ask.sagemath.org/question/10723/manage-my-functions-in-sage/I prefer bash/console as my SAGE editor with both hands always on the keyboard.
However, I want to manage those functions that are defined by myself in a way as in MATLAB, explicitly store m-functions in a toolbox folder and load them using addpath/import if necessary. Moreover, it seems inconvenient to modify/extend a function in bash/console in SAGE.
EMACS is perhaps a good choice?
Thanks in advance!gundamlhMon, 11 Nov 2013 03:44:45 +0100https://ask.sagemath.org/question/10723/Loading a predefined functionhttps://ask.sagemath.org/question/8637/loading-a-predefined-function/One thread showed how to [load functions at startup](http://ask.sagemath.org/question/1072/preload-defined-functions-for-later-use)
But how to load some predefined function (or a bunch of functions from some .py file, say) only as needed?Green diodSat, 11 Feb 2012 10:26:47 +0100https://ask.sagemath.org/question/8637/