469,625 Members | 1,059 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,625 developers. It's quick & easy.

win32ui CreateFileDialog SLOW (since the SP2 Windows XP patch?)

My client is used to clicking on the script name on her PC and getting
a windows command line box which it runs in. Not fancy but did the job
until recently...

Now it can take up to 4 minutes for the file dialog box to appear. No
problems with speed in PythonWin, of course, but she is not used to
doing that. Any suggestions? Anyone know why it is so slow?

Here is the code snippet to open her input file (output goes in the
same directory so we have to get the directory path for that)

try:
d=win32ui.CreateFileDialog(1)
d.DoModal()
inputpath=d.GetPathName()
inputsplit=string.split(inputpath,"\\")
inputdir = string.join(inputsplit[:-1],"\\")
inputname=d.GetFileName()
if printit:
print "input file is ",inputname
try:
input = open(inputname,"r") # expects text to mark up
except:
print "Error opening input file",inputname
if inputname:
print "Invalid Input File ",inputname
line = raw_input()
sys.exit(2)

(there's another except later in the code ...)

Kitty
OpenSkyWebDesign.com

Jul 19 '05 #1
3 1806
Kitty:
Now it can take up to 4 minutes for the file dialog box to appear. No
problems with speed in PythonWin, of course, but she is not used to
doing that. Any suggestions? Anyone know why it is so slow?


I have seen similar issues in the past but mainly on Windows 9x with
particular start directories for the dialog. Windows tries to remember
which directory was most recently chosen by each application. Possibly
it has associated python.exe with a directory on a removed drive,
network share, or virtual location (like "My Network Places") and takes
a while to fail over to a working place.

Neil
Jul 19 '05 #2
Neil -
Interesting theory, but I installed brand new versions of Python
(2.4.1) and the win32 extensions on a machine that had no Python and
got the the same 4 minute response time, so that does not seem a likely
explanation, although its possible.
- Kitty

Jul 19 '05 #3
MsKitty schrieb:
Neil -
Interesting theory, but I installed brand new versions of Python
(2.4.1) and the win32 extensions on a machine that had no Python and
got the the same 4 minute response time, so that does not seem a likely
explanation, although its possible.
- Kitty

Standalone machine or connected to a network ?
By any chance an older server (W2K,NT4) there ?

There were some issues...

HTH

thomas
Jul 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Me Mine | last post: by
1 post views Thread by EricP | last post: by
reply views Thread by Chris Gonnerman | last post: by
2 posts views Thread by Darcy Kahle | last post: by
1 post views Thread by Chris Lambacher | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.