save/load session in standalone python

asked 2017-03-10 19:15:06 +0200

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 19:33:00 +0200 )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 08:24:18 +0200 )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 17:19:56 +0200 )edit