Marius Butuc wrote:
I want do declare some classes (classes.py) in an external editor,
than import the file and use the classes. After I change the file, I
want to reload the definitions w/o leaving the interactive
interpreter.
So far I have tried
- import classes # doesn't import my classes
Use this and refer to the class from the imported module.
import classes
instance = classes.SomeClass()
...
reload(classes)
instance = classes.SomeClass()
This is by far the best way, but if you _must_,
from classes import *
instance = SomeClass()
...
reload(classes)
from classes import *
instance = SomeClass()
--Scott David Daniels
scott.dani...@acm.org
--
http://mail.python.org/mailman/listinfo/python-list