DogWalker wrote:
"Marc 'BlackJack' Rintsch" <[EMAIL PROTECTED]> said:


In <[EMAIL PROTECTED]>, Amir Dekel wrote:


When I import a module I have wrote, and then I find bugs, it seems that I can't import it again after a fix it. It always shows the same problem. I try del module but it doesn't work.
(I use Python 2.4 with the ActivePython pack (PythonWin IDE)


Solution anyone?

Yes -> help(reload)

Ciao,
        Marc 'BlackJack' Rintsch


First, save the file using the check option (Ctl+Shift+C, iirc);
Second, Fix any errors (attend to Status Bar);
Third, press Reload button in Toolbar (or type command from File Menu).
Four, assure that Status Bar indicates reload was successful.
If still doesn't load correctly, quit PythonWin and start it again.
Fifth, use the module unittest and write a test for your module. Just run the test to check your module and fix all errors, then import it into the larger sceme and see if everything works there. Most problems will appear in a good test, so you will not have the reimport issiue at all.
Chris
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to