save/load session in standalone python

asked 2017-03-10 12:15:06 -0500

maaaaaaartin gravatar image

Trying to save my sage session from a standalone python script, but I am getting the following error:

TypeError: argument of type 'NoneType' is not iterable

Can't find any information on that. Any idea what might be going on? Thanks!

edit retag flag offensive close merge delete



What do you mean by "save my sage session from a standalone python script" ? Either you are in a Sage session (e.g. ipython shell), or you execute a standalone Python script. could you please be more precise and provide a sample of script how you called it ?

tmonteil gravatar imagetmonteil ( 2017-03-10 12:33:00 -0500 )edit

Right. Sorry for lack of clarity. And thanks for trying to help. I am using sage in standalone python scripts. Is there a way for me to save all variables to a file, and load them in another script? Thanks!

maaaaaaartin gravatar imagemaaaaaaartin ( 2017-03-11 01:24:18 -0500 )edit

In ipython there are special tools for this (I guess they are used in e.g. Jupyter notebook environment to save the state), see e.g.

Dima gravatar imageDima ( 2018-03-22 11:19:56 -0500 )edit