473,395 Members | 1,675 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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 2179
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Me Mine | last post by:
i, I have trying to code a small console app that will allow a user to select a window and then create a screen capture of the window. I haven't been able to figure out how to do the screen...
1
by: EricP | last post by:
I get the following error when I run this script to open a file dialog. I've searched the web and news groups for this issue and have not found any references. I get the same behavior when I run...
0
by: Chris Gonnerman | last post by:
I am rewriting an antique BASIC program in Python for a customer. The main feature of the program is printing a work order for a particular assembly; the BASIC program uses IBM OEM line-drawing...
2
by: Darcy Kahle | last post by:
I am trying to do some advanced printing in python using the win32ui module, and have run into an issue. I need to print a page landscape. As I could not determine how to specify the orientation...
1
by: Chris Lambacher | last post by:
Hi, This question has come up a few times on the list with no one giving a public answer. How do you use CreatePrintDialog from win32ui? About a year ago someone posted that: dlg =...
4
by: Joey C. | last post by:
Hello. I'm writing a program that creates a series of batch operations to convert movies to be used on iPodLinux. The programs that do the encoding and conversions are seperate from mine and all...
3
by: robert | last post by:
As soon as I install wxPython on a Py2.3.5, my win32ui / win32gui apps freak out. buttons in dialogs are magically pressed. backgrounds of dialogs are colored wrong... this is with current...
5
by: nobugus | last post by:
Just posting a solution to the problem of capturing the whole virtual screen area, including all monitors with python and pywin32. Because this doesn't work even with PIL's imagegrab module. ...
6
by: bg_ie | last post by:
Hi, My company's backend is located at a location with a long address, something like - //our_servers/server_number_one/our_department/our_devision/ our_results/our_databases/backend.be I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.