On 5/16/2008 4:26 PM, Garland, Ken R wrote:
> I've narrowed it down to this:
> 
> try:
>     import pywinauto.application
>     app = pywinauto.application.Application()
> except:
>     f = open('c:\output.txt', 'a')
>     f.write('import error\n')
>     f.close()
> 
> Here is the Application class: http://pastebin.com/m282d9e36
> 
> I wrapped the above in a try/except which writes to a file, when
> running via "c:\python25\python.exe code.py" it works fine, but when
> running from the PyInstaller EXE it will write to the output file
> which shows there was an exception.
> 
> Batch file to run Build:
> 
> set PIP=c:\pyinstaller\
> c:\python25\python.exe %PIP%Makespec.py --onefile --noconsole --upx
> --tk c:\junk.py
> c:\python25\python.exe %PIP%Build.py junk.spec
> 
> SPEC file:
> 
> a = Analysis([os.path.join(HOMEPATH,'support\\_mountzlib.py'),
> os.path.join(HOMEPATH,'support\\unpackTK.py'),
> os.path.join(HOMEPATH,'support\\useTK.py'),
> os.path.join(HOMEPATH,'support\\useUnicode.py'), 'c:\\junk.py',
> os.path.join(HOMEPATH,'support\\removeTK.py')],
>              pathex=['c:\\'])
> pyz = PYZ(a.pure)
> exe = EXE(TkPKG(), pyz,
>           a.scripts,
>           a.binaries,
>           name='junk.exe',
>           debug=False,
>           strip=False,
>           upx=True,
>           console=False )
> 
> 
> Again, all of this works on WinXP, but not on Win2K. I'm still hoping
> this is my problem.

Don't you see the exception if you activate the debug and console by 
hand-editing the spec file?

And if you don't, you can use the traceback module to dump the whole 
traceback within your output.txt file anyway.
-- 
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