PythonWin (build 203) for Python 2.3 causes Windows 2000 to grind to a halt?

Discussion in 'Python' started by Chris P., Jan 27, 2005.

  1. Chris P.

    Chris P. Guest

    I've been having a problem with PythonWin that seemed to start
    completely spontaneously and I don't even know where to START to find
    the answer. The only thing I can think of that marks the point
    between "PythonWin works fine" and "PythonWin hardly every works fine"
    was that I changed the size of my Virtual Paging file, noticing that
    it was too small (I currently have a P4 with 1G of RAM). I tried
    returning it to its original (smaller) size, but it didn't fix the
    problems.

    The first time I noticed it, I was using PythonWin and then
    right-clicked on My Computer to use "Explore". Instead of the usual
    full listing (approx 10 items), I got a mini-listing of 4 items.
    Then, after clicking "Explore", I either don't get a new window at all
    OR I get a strange file explorer that won't let me look at files,
    won't let me copy files, etc. The "mini-lising" thing also happens if
    I click the "Start" button while PythonWin is open.

    Another problem is trying to open another program while PythonWin is
    running - generally, the program will not start, but I also don't get
    any kind of error popping up on the screen. My request is just
    ignored (although I sometimes get a "system beep".) If I already have
    other programs open and then open PythonWin, my menu bar might refuse
    to function. Is it significant that, when the menu bar IS working,
    the drop-down menu fades in quite slowly, instead of popping up
    immediately?

    At the end of this message, I've pasted a screen dump of a message I
    get when I try to open a file and I've got other apps open (note that
    I can have very few, non-memory intensive apps open and I still get
    it).

    Thanks for any help you can give,

    - Chris

    [SCREEN DUMP AFTER I TRY TO OPEN A .PY FILE]
    File "C:\Python23\Lib\site-packages\pythonwin\pywin\mfc\docview.py",
    line 91, in CreateNewFrame
    wnd.LoadFrame(self.GetResourceID(), -1, None, context) # triggers
    OnCreateClient...
    win32ui: LoadFrame failed

    win32ui: CreateNewFrame() virtual handler (<bound method
    SyntEditTemplate.CreateNewFrame of
    <pywin.framework.editor.color.coloreditor.SyntEditTemplate instance at
    0x01193F30>>) raised an exception
    TypeError: PyCTemplate::CreateNewFrame must return a PyCFrameWnd
    object.
    Chris P., Jan 27, 2005
    #1
    1. Advertising

  2. Chris P.

    Roger Upole Guest

    These look like symptoms of sf bug #1017504
    http://sourceforge.net/tracker/index.php?func=detail&aid=1017504&group_id=78018&atid=551954

    What version of Pywin32 are you running ?
    There's a (semi) fix for this in the latest build.
    hth
    Roger


    "Chris P." <> wrote in message
    news:...
    > I've been having a problem with PythonWin that seemed to start
    > completely spontaneously and I don't even know where to START to find
    > the answer. The only thing I can think of that marks the point
    > between "PythonWin works fine" and "PythonWin hardly every works fine"
    > was that I changed the size of my Virtual Paging file, noticing that
    > it was too small (I currently have a P4 with 1G of RAM). I tried
    > returning it to its original (smaller) size, but it didn't fix the
    > problems.
    >
    > The first time I noticed it, I was using PythonWin and then
    > right-clicked on My Computer to use "Explore". Instead of the usual
    > full listing (approx 10 items), I got a mini-listing of 4 items.
    > Then, after clicking "Explore", I either don't get a new window at all
    > OR I get a strange file explorer that won't let me look at files,
    > won't let me copy files, etc. The "mini-lising" thing also happens if
    > I click the "Start" button while PythonWin is open.
    >
    > Another problem is trying to open another program while PythonWin is
    > running - generally, the program will not start, but I also don't get
    > any kind of error popping up on the screen. My request is just
    > ignored (although I sometimes get a "system beep".) If I already have
    > other programs open and then open PythonWin, my menu bar might refuse
    > to function. Is it significant that, when the menu bar IS working,
    > the drop-down menu fades in quite slowly, instead of popping up
    > immediately?
    >
    > At the end of this message, I've pasted a screen dump of a message I
    > get when I try to open a file and I've got other apps open (note that
    > I can have very few, non-memory intensive apps open and I still get
    > it).
    >
    > Thanks for any help you can give,
    >
    > - Chris
    >
    > [SCREEN DUMP AFTER I TRY TO OPEN A .PY FILE]
    > File "C:\Python23\Lib\site-packages\pythonwin\pywin\mfc\docview.py",
    > line 91, in CreateNewFrame
    > wnd.LoadFrame(self.GetResourceID(), -1, None, context) # triggers
    > OnCreateClient...
    > win32ui: LoadFrame failed
    >
    > win32ui: CreateNewFrame() virtual handler (<bound method
    > SyntEditTemplate.CreateNewFrame of
    > <pywin.framework.editor.color.coloreditor.SyntEditTemplate instance at
    > 0x01193F30>>) raised an exception
    > TypeError: PyCTemplate::CreateNewFrame must return a PyCFrameWnd
    > object.





    ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
    http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
    ---= East/West-Coast Server Farms - Total Privacy via Encryption =---
    Roger Upole, Jan 28, 2005
    #2
    1. Advertising

  3. Chris P.

    Chris P. Guest

    AWESOME - my life just got THAT much better.

    The bug you suggested is exactly the problem that I was having... I
    had looked through the bugs being tracked, but the title of that one
    didn't jump out at me as something that would help. Thanks!

    - Chris

    P.S. For anyone reading this group who wants to know exactly what I
    did:
    1) Uninstall Pywin32
    2) Open the registry editor ('regedit' at the command prompt)
    3) Go to HKEY_CURRENT_USER\Software\Python[version]\Python for Win32
    You will likely find many many many keys that have the format
    "ToolbarDefault-Bar#". These keys filling up your registry cause
    Windows 2000 to become extremely slow/unstable when Python is running
    (especially if your debugger is running.)
    4) Delete the keys... I just deleted it at the "Python[version]" root
    5) Reinstall Pywin32

    "Roger Upole" <> wrote in message news:<41f9e4a9$1_1@127.0.0.1>...
    > These look like symptoms of sf bug #1017504
    > http://sourceforge.net/tracker/index.php?func=detail&aid=1017504&group_id=78018&atid=551954
    >
    > What version of Pywin32 are you running ?
    > There's a (semi) fix for this in the latest build.
    > hth
    > Roger
    Chris P., Jan 28, 2005
    #3
  4. Re: PythonWin (build 203) for Python 2.3 causes Windows 2000 to grindto a halt?

    Chris P. wrote:
    > AWESOME - my life just got THAT much better.
    >
    > The bug you suggested is exactly the problem that I was having... I
    > had looked through the bugs being tracked, but the title of that one
    > didn't jump out at me as something that would help. Thanks!
    >
    > - Chris
    >
    > P.S. For anyone reading this group who wants to know exactly what I
    > did:
    > 1) Uninstall Pywin32
    > 2) Open the registry editor ('regedit' at the command prompt)
    > 3) Go to HKEY_CURRENT_USER\Software\Python[version]\Python for Win32
    > You will likely find many many many keys that have the format
    > "ToolbarDefault-Bar#". These keys filling up your registry cause
    > Windows 2000 to become extremely slow/unstable when Python is running
    > (especially if your debugger is running.)
    > 4) Delete the keys... I just deleted it at the "Python[version]" root
    > 5) Reinstall Pywin32
    >

    This is a great workaround but I've found that, with build 203, it needs
    to be repeated from time to time.

    Colin W.


    > "Roger Upole" <> wrote in message news:<41f9e4a9$1_1@127.0.0.1>...
    >
    >>These look like symptoms of sf bug #1017504
    >>http://sourceforge.net/tracker/index.php?func=detail&aid=1017504&group_id=78018&atid=551954
    >>
    >>What version of Pywin32 are you running ?
    >>There's a (semi) fix for this in the latest build.
    >> hth
    >> Roger
    Colin J. Williams, Jan 29, 2005
    #4
  5. Chris P.

    Martin Bless Guest

    [ (Chris P.)]

    >The bug you suggested is exactly the problem that I was having... I
    >had looked through the bugs being tracked, but the title of that one
    >didn't jump out at me as something that would help. Thanks!


    Yes, using Python24 and the latest win32 build on my machine the bug
    still exists. PythonWin works fine if you don't use the debugger.

    But since the debugger is the most valuable feature for me I sadly had
    to stop using PythonWin. For a while I found some help by running the
    script below every now and then. It deletes the erroneous registry
    entries. But currently the bugs are stronger.

    Here's my solution: I spent some money and switched to "WingIde" from
    wingware.com. Wow, it's breathtaking and worth each penny. Don't
    compare WingIde with other editors. WingIde really plays in the IDE
    (integrated development environment) league. And it's very Python
    aware and knowledgable ...

    mb - Martin Bless


    Here's my script to delete the erroneous debugger entries:

    Script "delete-debugger-entries,pywin,python24.py"

    #!/usr/bin/env python
    # -*- coding: iso-8859-1 -*-

    """Delete problematic registry entries in 'Python for Win32'.

    Martin Bless, mb, 2004-09-24, 2005-01-05
    No warrenties whatsoever. Use at your own risk.
    """

    import win32api
    import win32con

    subKey = r'Software\Python 2.4\Python for Win32'
    subKey = r'Software\Python 2.4\Python for Win32'

    if 1:
    #HKEY_CURRENT_USER\Software\Python 2.4\Python for
    Win32\ToolbarDebugging-Bar0
    k =
    win32api.RegOpenKeyEx(win32con.HKEY_CURRENT_USER,subKey,0,win32con.KEY_ALL_ACCESS)
    nsubkeys,nvalues,timeval = win32api.RegQueryInfoKey(k)
    keys = []
    for i in range(nsubkeys):
    s = win32api.RegEnumKey(k,i)
    if (s.startswith('ToolbarDefault-Bar') or
    s.startswith('ToolbarDebugging-Bar')):
    keys.append(s)
    for i,key in enumerate(keys):
    subKey2 = subKey + '\\' + key
    print i,':', subKey2
    win32api.RegDeleteKey(win32con.HKEY_CURRENT_USER,subKey2)
    if i>99999:
    break
    k.Close()
    print len(keys),"deleted."
    Martin Bless, Jan 30, 2005
    #5
    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. sfunds sfunds
    Replies:
    9
    Views:
    8,717
  2. stephan
    Replies:
    0
    Views:
    434
    stephan
    Jul 30, 2003
  3. John Ersatznom
    Replies:
    15
    Views:
    948
    John Ersatznom
    Dec 17, 2006
  4. Gunjan Desai

    Creation of ASPNET user in Active Directory 203

    Gunjan Desai, Mar 29, 2005, in forum: ASP .Net Security
    Replies:
    5
    Views:
    636
    Dominick Baier [DevelopMentor]
    Apr 1, 2005
  5. Rk Ch
    Replies:
    3
    Views:
    104
    Damjan Rems
    Apr 30, 2008
Loading...

Share This Page