By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,214 Members | 2,072 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,214 IT Pros & Developers. It's quick & easy.

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

P: n/a
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.SyntEdit Template instance at
0x01193F30>>) raised an exception
TypeError: PyCTemplate::CreateNewFrame must return a PyCFrameWnd
object.
Jul 18 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
These look like symptoms of sf bug #1017504
http://sourceforge.net/tracker/index...18&atid=551954

What version of Pywin32 are you running ?
There's a (semi) fix for this in the latest build.
hth
Roger
"Chris P." <ch**************@utoronto.ca> wrote in message
news:3f**************************@posting.google.c om...
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.SyntEdit Template 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 =---
Jul 18 '05 #2

P: n/a
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" <ru****@hotmail.com> wrote in message news:<41**********@127.0.0.1>...
These look like symptoms of sf bug #1017504
http://sourceforge.net/tracker/index...18&atid=551954

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

Jul 18 '05 #3

P: n/a
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" <ru****@hotmail.com> wrote in message news:<41**********@127.0.0.1>...
These look like symptoms of sf bug #1017504
http://sourceforge.net/tracker/index...18&atid=551954

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

Jul 18 '05 #4

P: n/a
[ch**************@utoronto.ca (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,s ubKey,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,s ubKey2)
if i>99999:
break
k.Close()
print len(keys),"deleted."

Jul 18 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.