On 4/16/2008 5:52 PM, pythonista wrote:
> I want to update my software on the fly, so my Pyinstaller-packaged
> python program downloads a new version, then calls
>     os.spawnl(os.P_NOWAIT, my-installer, my-installer)
> and exits.  The installer fails because it cannot delete the
> executable.  Using handle.exe from 
> http://technet.microsoft.com/en-us/sysinternals/bb896655.aspx
> shows the called program has open handles to the caller:
> 
> listomaxinstall.exe pid: 1844 DELL420\phil
>    44: File  (RW-)   C:\Program Files\Listomax\Listomax.exe
>    CC: File  (RW-)   C:\Program Files\Listomax\Listomax.exe
>   144: File  (RW-)   C:\Documents and Settings\phil\Application Data
> \Listomax\phil1
> ...etc.
> 
> Environment is Windows XP SP2.  To reproduce this, package the
> following 3-line python program, then attempt to delete the executable
> while notepad is still open.  The delete will fail.
> 
> import os
> dst = r'C:\windows\system32\notepad.exe'
> os.spawnl(os.P_NOWAIT, dst, dst)
> 
> For comparison, I tried spawnl from a C program; it does not have the
> same problem.
> 
> I know this is somewhat obscure, and it's not a show-stopper, but if
> anyone has any clues, I'd appreciate it.  Thanks, Phil

Some work was done on this regard a few months ago by Anton Gyllenberg 
(have a look at his patches in the archives).

Basically, the trick is to have an extranal .pkg file instead of having 
it attached ot the executable. Look for "append_pkg" in the manual.

This should fix your issue.
-- 
Giovanni Bajo
Develer S.r.l.
http://www.develer.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/PyInstaller?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to