You can put code in a .py file and use %run in IPython or the notebook
to run it. Or in pure Python you can add it to a function, import the
file, and run the function (using a function for this case is
recommended because while Python's 'import' will run the code in the
body of the file, it will only import a module once and cache it after
that).
Aaron Meurer
> --
> You received this message because you are subscribed to the Google Groups "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
sympy+un...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/d4913e80-156a-48fa-914b-27b16049b71cn%40googlegroups.com.