save class

Diez B. Roggisch deets at
Fri Jun 15 12:19:37 CEST 2007

> of having to keep track of a separate dictionary file. I am new to
> this, but I thought that this would be a regular thing to do in
> python, because people must make classes in the interactive console
> and then export them somehow for later use.

No. That's not how things work. One does dabble with the interpreter a 
bit, sometimes even creating a tiny class.

But except from the occasional expression tested in the interpreter, 
it's not common to use that code and save it.

Write python-files from the start. Then either execute them


or if you insist, do


 >>> import myfile
 >>> myfile.some_function()


More information about the Python-list mailing list