1 | initial version |
To import:
code from other files (.py, .sage, ..) into a notebook, this can be done simply with the load command, as in load('foo.py')
.
if you want to use standard python imports: say your library is in foo.sage
, then
%%bash sage --preparse 'foo.sage' # will import sage library (sage.all_cmdline) = everything so that Sage functions can be called externally, into a new file file foo.sage.py mv foo.sage.py foo.py # let's rename it from foo import monty
2 | No.2 Revision |
To import:
code from other files (.py, .sage, ..) into a notebook, this can be done simply with the load command, as in load('foo.py')
.
if you want to use standard python imports: say your library is in foo.sage
, then
%%bash
sage --preparse 'foo.sage' # will import sage library (sage.all_cmdline) = everything so that Sage functions can be called externally, into a new file file foo.sage.py
mv foo.sage.py foo.py # let's rename it
from foo import monty
3 | No.3 Revision |
To import:
code from other files (.py, .sage, ..) into a notebook, this can be done simply with the load command, as in load('foo.py')
.
if you want to use standard python imports: say your library is in foo.sage
, then
%%bash
sage --preparse 'foo.sage' # will import sage library (sage.all_cmdline) = everything so that Sage functions can be called externally, into a new file file foo.sage.py
mv foo.sage.py foo.py # let's rename it
from foo import montymonty
...
4 | No.4 Revision |
To import:
code from other files (.py, .sage, ..) into a notebook, this can be done simply with the load command, as in load('foo.py')
.
if you want to use standard python imports: say your library is in foo.sage
, then
%%bash
%%bash
sage --preparse 'foo.sage' # will import sage library (sage.all_cmdline) = everything so that Sage functions can be called externally, into a new file file foo.sage.py
foo.sage.py
mv foo.sage.py foo.py # let's rename it
it
from foo import monty
monty
...
5 | No.5 Revision |
To import:
code from other files (.py, .sage, ..) into a notebook, this can be done simply with the load command, as in load('foo.py')
.
if you want to use standard python imports: say your library is in foo.sage
, then
%%bash
sage --preparse 'foo.sage' # will import sage library (sage.all_cmdline) = everything so that Sage functions can be called externally, into a new file file foo.sage.py
mv foo.sage.py foo.py # let's rename it
from foo import monty
...
6 | No.6 Revision |
To import:
code from other files (.py, .sage, ..) into a notebook, this can be done simply with the load command, as in load('foo.py')
.
if you want to use standard python imports: say your library is in foo.sage
, then
%%bash -
%%bash
sage --preparse 'foo.sage' # will import sage library (sage.all_cmdline) = everything so that Sage functions can be called externally, into a new file file ...
7 | No.7 Revision |
To import:
code from other files (.py, .sage, ..) into a notebook, this can be done simply with the load command, as in load('foo.py')
.
if you want to use standard python imports: say your library is in foo.sage
, then
-
%%bash
sage --preparse 'foo.sage' # will import sage library (sage.all_cmdline) = everything so that Sage functions can be called externally, into a new file file foo.sage.py
mv foo.sage.py foo.py # let's rename it
from foo import monty
...
8 | No.8 Revision |
To import:
code from other files (.py, .sage, ..) into a notebook, this can be done simply with the load command, as in load('foo.py')
.
if you want to use via standard python imports: say your library is in foo.sage
, then
-
%%bash
sage --preparse 'foo.sage' # will import sage library (sage.all_cmdline) = everything so that Sage functions can be called externally, into a new file foo.sage.py
mv foo.sage.py foo.py # let's rename it
from foo import monty
...
9 | No.9 Revision |
To import:
code from other files (.py, .sage, ..) into a notebook, this can be done simply with the load command, as in load('foo.py')
.
via standard python imports: say your library is in foo.sage
, then
-
%%bash
sage --preparse 'foo.sage' # will import sage library (sage.all_cmdline) = everything so that Sage functions can be called externally, into a new file foo.sage.py
mv foo.sage.py foo.py # let's rename it
-
from foo import monty
...