Dnia Tue, 12 Aug 2008 07:58:52 -0700 (PDT), [EMAIL PROTECTED] napisa�(a):
>> I'm using python's interpreter's to run various commands (like a
>> normal shell). However if sources are modified changes are not
>> reflected so I have to restart interpreter. Is there any way to avoid
>> restarting this?
>>
>> example:
>>
>> import blah
>>
>> blah.Blah()
>> # ... blah.Blah() changed
>>
>> blah.Blah()
>> # ... new behavior
>
> blah = reload(blah)

...but don't forget to read point 7.5 of the Programming FAQ:
http://www.python.org/doc/faq/programming/

And keep in mind that reload() is removed in Py3k. Hope this helps.

-- 
Regards,
Wojtek Walczak,
http://www.stud.umk.pl/~wojtekwa/
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to