Loading a file into the interpreter

T

Thomas Womack

I'd like, from the command line of the python interpreter, to get the
effect of having typed in the contents of some text file; the sort of
thing I'd expect a "load" command to do.

I can do "python prog.py", but that doesn't leave me in the
interpreter afterwards, and I'd often like to set some variables, load
a program, and poke about to see what the variables look like
afterwards.

Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top