how does the main module notice when I change a module

Discussion in 'Python' started by Marcus Schneider, Aug 15, 2003.

  1. 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?
    Marcus Schneider, Aug 15, 2003
    #1
    1. Advertising

  2. Marcus Schneider

    John Roth Guest

    "Irmen de Jong" <> wrote in message
    news:3f3d4cca$0$49103$4all.nl...
    > Marcus Schneider wrote:
    >
    > > 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?

    >
    > 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

    >
    > --Irmen
    >
    John Roth, Aug 16, 2003
    #2
    1. Advertising

  3. "John Roth" <> schrieb im Newsbeitrag
    news:...


    [..]>
    > 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
    Michael Peuser, Aug 16, 2003
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Karl Seguin
    Replies:
    1
    Views:
    433
  2. Bob Gailer
    Replies:
    2
    Views:
    297
    Marcus Schneider
    Aug 16, 2003
  3. News123
    Replies:
    1
    Views:
    699
  4. Robert Oschler
    Replies:
    1
    Views:
    390
  5. Dennis Ålund
    Replies:
    2
    Views:
    140
    Dennis Ålund
    Nov 29, 2005
Loading...

Share This Page