external file closed

2006-10-17 Thread kilnhead
I am opening a file using os.start('myfile.pdf') from python. How can I know when the user has closed the file so I can delete it? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: external file closed

2006-10-17 Thread Jerry
On Oct 17, 12:43 pm, kilnhead [EMAIL PROTECTED] wrote: I am opening a file using os.start('myfile.pdf') from python. How can I know when the user has closed the file so I can delete it? Thanks. I assume you mean os.startfile. There is no way to do this directly. os.startfile simply hands off

Re: external file closed

2006-10-17 Thread utabintarbo
Jerry wrote: On Oct 17, 12:43 pm, kilnhead [EMAIL PROTECTED] wrote: I am opening a file using os.start('myfile.pdf') from python. How can I know when the user has closed the file so I can delete it? Thanks. I assume you mean os.startfile. There is no way to do this directly. os.startfile

Re: external file closed

2006-10-17 Thread [EMAIL PROTECTED]
You may be able to use os.popen() kilnhead wrote: I am opening a file using os.start('myfile.pdf') from python. How can I know when the user has closed the file so I can delete it? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: external file closed

2006-10-17 Thread Jordan
I think the win32all extension includes the findwindow() fuction, so you could make a loop that looks for the window name (or class if it takes that) of the pdf. You can also loop through a list of running processes looking for whatever the process name is. Note that both of these have serious