Bugs item #1219726, was opened at 2005-06-13 09:19
Message generated for change (Settings changed) made by rupole
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1219726&group_id=78018
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: pythonwin
Group: None
>Status: Closed
>Resolution: Works For Me
Priority: 5
Private: No
Submitted By: wpostma (wpostma)
Assigned to: Nobody/Anonymous (nobody)
Summary: PythonWin run-script opens file-open-dialogs in a tight loop
Initial Comment:
On my system, python2.4+win32all build 204,
as well as on the previous build build203 of win32all,
pythonwin is unable to run any script and the Run
Script dialog seems severely borked.
When I hit Ctrl+R it opens the Run Script dialog, and
then it is like something has clicked the Browse
button. The file-open dialog opens. I can not cancel
this dialog, or move it, for every time I move the
current file-open dialog, or cancel it, orclick okay,
another one opens. I can get dozens of File Open
dialogs open at once. Once I am stuck here the only
option is to kill PythonWin from the task manager.
I don't know how to debug this situation, but if anyone
can tell me how to further investigate this, I'll look
into the best I can.
In scriptutils.py, I made the changes marked by
asterisks below:
class DlgRunScript(dialog.Dialog):
.....
def OnBrowse(self, id, cmd):
** if self.browsing:
** return 0
** self.browsing = 1
openFlags =
win32con.OFN_OVERWRITEPROMPT|win32con.OFN_FILEMUSTEXIST
dlg = win32ui.CreateFileDialog(1,None,None,openFlags,
"Python Scripts (*.py)|*.py||", self)
dlg.SetOFNTitle("Run Script")
if dlg.DoModal()!=win32con.IDOK:
return 0
self['script'] = dlg.GetPathName()
self.UpdateData(0)
** self.browsing = 0
return 0
This was intended to prevent any endless showing of the
dialog in a loop, which makes the problem less nasty
but doesn't fix the problem. I have no idea how to
really fix it. Also getting rid of the hook command:
self.HookCommand(self.OnBrowse, win32ui.IDC_BUTTON2)
Which would disable the browse button completely also
fixes the problem.
My system is Windows XP Service Pack 2, with 2 gb ram.
----------------------------------------------------------------------
>Comment By: Roger Upole (rupole)
Date: 2008-02-18 20:50
Message:
Logged In: YES
user_id=771074
Originator: NO
I can't reproduce this either.
Please reopen if you still see this problem
elsewhere.
----------------------------------------------------------------------
Comment By: Mark Hammond (mhammond)
Date: 2005-06-27 06:36
Message:
Logged In: YES
user_id=14198
I'm afraid I can't repro this and have never had anything
similar reported. Can you try on another machine?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1219726&group_id=78018
|