[Tutor] pythonwin

Magnus Lycka magnus@thinkware.se
Fri Jan 31 08:18:01 2003


At 15:45 2003-01-29 +0100, Mantovani Alberto wrote:
>Hi,
>working with Pythonwin I've noted that if you launch a script a first time
>and then you modify and relaunch it, the script that goes in ecxecution is
>alwais the first one that you launch. To execute the modify script you have
>to exit and to enter   from pythonwin. This could be annoying, so my
>question is:
>
>1) Is there some method or some script to avoid this?

import X
...
reload(X)

>I have found the manner to delete the module if it is imported with <import>
>but not if it is imported with <from xxx import yyy>.

Yet another reason to avoid the from...syntax.

You may find that nothing beats the command line in the end.
COMMAND.COM stinks, but with a better OS, you might find the
command line very useful. CMD.EXE (in NT and derivates) is
already much better, just enable tab completion. It's not as
good as unix shells of cource. But they are available for
Windows too...

You can even survive with COMMAND.COM if you have to, as long
as you run DOSKEY /I before you start working...


-- 
Magnus Lycka, Thinkware AB
Alvans vag 99, SE-907 50 UMEA, SWEDEN
phone: int+46 70 582 80 65, fax: int+46 70 612 80 65
http://www.thinkware.se/  mailto:magnus@thinkware.se