Re: loading program's global variables in ipython

2009-03-23 Thread Esmail
Peter Otten wrote: Use %run -i myfile.py or execfile(myfile.py) # not ipython-specific thanks for these suggestions Peter, I have had exactly the same problem and was looking for a way around it -- this will be very helpful. Esmail ps: for some reason I am unable to post to the

loading program's global variables in ipython

2009-03-22 Thread per
hi all, i have a file that declares some global variables, e.g. myglobal1 = 'string' myglobal2 = 5 and then some functions. i run it using ipython as follows: [1] %run myfile.py i notice then that myglobal1 and myglobal2 are not imported into python's interactive namespace. i'd like them too

Re: loading program's global variables in ipython

2009-03-22 Thread Peter Otten
per wrote: i have a file that declares some global variables, e.g. myglobal1 = 'string' myglobal2 = 5 These aren't declarations, this is exectutable code. and then some functions. i run it using ipython as follows: [1] %run myfile.py i notice then that myglobal1 and myglobal2 are

loading program's global variables in ipython

2009-03-22 Thread R. David Murray
per perfr...@gmail.com wrote: hi all, i have a file that declares some global variables, e.g. myglobal1 = 'string' myglobal2 = 5 and then some functions. i run it using ipython as follows: [1] %run myfile.py i notice then that myglobal1 and myglobal2 are not imported into