save/load session in standalone python

asked 8 years ago

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!

Preview: (hide)

Comments

1

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 ( 8 years ago )

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 ( 8 years ago )

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. https://stackoverflow.com/questions/2...

Dima gravatar imageDima ( 6 years ago )