how does the main module notice when I change a module

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Marcus Schneider

    how does the main module notice when I change a module

    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?
  • John Roth

    #2
    Re: how does the main module notice when I change a module


    "Irmen de Jong" <irmen@-NOSPAM-REMOVETHIS-xs4all.nl> wrote in message
    news:3f3d4cca$0 $49103$e4fe514c @news.xs4all.nl ...[color=blue]
    > Marcus Schneider wrote:
    >[color=green]
    > > 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?[/color]
    >
    > Doesn't "reload(MyModul e)" work?
    > Type it at the interactive prompt.[/color]

    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
    [color=blue]
    >
    > --Irmen
    >[/color]


    Comment

    • Michael Peuser

      #3
      Re: how does the main module notice when I change a module


      "John Roth" <newsgroups@jhr othjr.com> schrieb im Newsbeitrag
      news:vjqv5v78pt ob98@news.super news.com...


      [..]>[color=blue]
      > 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
      >[/color]

      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


      Comment

      Working...