Some users in my lab are used to Matlab's workspace and begin with the ipython notebook. So, I tried to simulate a workspace using ipython widgets. Inside the ipython.py, there is a workspace class. I've tried to use it as workspace(get_ipython()) but the class don't have access to ipython variables from a script. If I define this class inside the notebook, it works but not from a script.
So I put a main, I execute the file with exec() and I display the workspace object :
path = '/home/download/'
file = 'ipython.py'
exec(open(path+file).read())
wksp
The executiong method works but it's really ugly. Does someone have an idea how to make it better?