[python-win32] Using os.startfile() for automation

Tony Cappellini tony at tcapp.com
Thu Feb 3 21:52:18 CET 2011


On Windows XP, I'm able to launch the application associated with file1.xxx.

os.startfile("file1.xxx")

I want to start more instances of the application, so that I can process
several files at the same time.

calling os.startfile("file2.xxx") causes the instance of the application to
also open file2.xxx.

The problem with this is- I have to wait until file1 has finished
processing, before I can start file2.

If, after opening the first instance for file1, I can use the Start Menu,
Program Files, open another instance of the application, I can then start
processing file2 at the same time as file1, but using a separate instance.

Is there any other way to invoke startfile() or other function- to force a
new instance of the application to open?

How would I close the application from Python, that was started with
os.startfile()?


Once the application is open, I just want to use File Save As Text, to get
the data into a text file.
Python's app-automation capabilities are kinda weak and not well documented,
so I may resort to AutoIt3.

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20110203/af7a5c74/attachment.html>


More information about the python-win32 mailing list