how does the main module notice when I change a module

M

Marcus Schneider

I use PythonWin on WinXP. Every time I change a module, I have to
leave PythonWin and re enter to make it notice I have made changes. I
guess this is not the normal way to do that.. do I have to store the
module at a specific place? Is there a kind of "reset" command to make
the main module update specific data?
 
J

John Roth

Irmen de Jong said:
Doesn't "reload(MyModule)" work?
Type it at the interactive prompt.

Sometimes it does, sometimes it doesn't. It depends on exactly how your
application is configured, and the last thing I want to do is switch to the
command screen to type something in to run a test, and then have to run
the test as well. Extra work is, well, extra work.

Frankly, I gave up trying to test directly under PythonWin a long time
ago. Now, I just use it for editing, and keep a command window open
for testing. I've got a script for each test module (I use unittest in true
XP test first fashion), and it's almost as fast to switch to the command
window and enter two characters and a return as it would be to make
sure the correct file is selected, go to the menu, select test and
hit enter.

I've heard rumblings that the latest version of Idle (the one shipped
with 2.3) runs your tests in a separate process so this problem doesn't
happen. However, I haven't installed 2.3 yet to check it out. It might
be time to check out Idle if it does indeed create a new process for
each test.

John Roth
 
M

Michael Peuser

[..]>
I've heard rumblings that the latest version of Idle (the one shipped
with 2.3) runs your tests in a separate process so this problem doesn't
happen. However, I haven't installed 2.3 yet to check it out. It might
be time to check out Idle if it does indeed create a new process for
each test.

John Roth

There is generally no need to install Python 2.3 for another IDLE. I could
use the IDLE 1.0 coming with with 2.3 under 2.3 - though I am not quite
content with it....

There is a IDLEfork Project http://idlefork.sourceforge.net/ where all the
new IDLEs come from...

My favourit is IDLE 0.81 which is shipped with VPYTHON, but you probably can
find it the archives.
Under Windows 2000 it (0.81) does not come up the first time when opening it
from Windows (Edit with....), Newer versions 0.9, 1.0 do, but they as well
open a command line window every time. This not only pollutes the desktop
but sometimes hangs up the communication. After a while you will find
youself with 10 or more interpreters in the background and you have to kill
them with the task manager.....

The mechanism they use is internal TCP/IP communication. This as I mentioned
can hang up. You than need not restart WIndows but just clean up all the
Pythons lurking in the background...


Kindly
Michael P
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,906
Latest member
SkinfixSkintag

Latest Threads

Top