Thanks, I was not aware of these debug options, it helped me find that
I had to load some modules by hand before things would work:
from pywinauto.tests import allcontrols
from pywinauto.tests import asianhotkey
from pywinauto.tests import comboboxdroppedheight
from pywinauto.tests import comparetoreffont
from pywinauto.tests import leadtrailspaces
from pywinauto.tests import miscvalues
from pywinauto.tests import missalignment
from pywinauto.tests import missingextrastring
from pywinauto.tests import overlapping
from pywinauto.tests import translation
from pywinauto.tests import truncation
from pywinauto.application import Application
from pywinauto import findwindows
from pywinauto.findwindows import WindowNotFoundError
from pywinauto.application import Application
from pywinauto import taskbar
from pywinauto.controls.HwndWrapper import HwndWrapper
On Fri, May 16, 2008 at 11:01 AM, Giovanni Bajo <[EMAIL PROTECTED]> wrote:
>
> 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
-~----------~----~----~----~------~----~------~--~---