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

M

MsKitty

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
 
N

Neil Hodgson

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
 
M

MsKitty

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
 
T

Thomas Ganss

MsKitty said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top