Seite 1 von 1

py2exe prob mit GUI's

Verfasst: Sonntag 25. Januar 2004, 22:32
von N17R0
Hi,
hab das Problem, wenn ich mit py2exe mein script in ne exe convertiere, funktioniert die sache nur mit scripten für die console. alle scripts, die mit ner gui arbeiten, funktionieren nich. habs schon mit python 2.2.2 und 2.3.3 und den entsprechenden versionen von py2exe ausprobiert, aber jedes mal nur die nicht funktionierende exe.

weiß jemand, wo das problem liegen könnte? hab mich bei 2.3.3 an die anweisungen von hier: http://starship.python.net/crew/theller/py2exe/ gehalten. bei der version 2.2.2 hab ich mich an die tips in dem forum hier gehalten.

Greetz

gui

Verfasst: Dienstag 27. Januar 2004, 16:10
von alpha
Hallo,

das einzige Problem, daß ich mal hatte war als ich Bilder in das Programm
eingebunden hatte. py2exe kopiert die Bilder nicht in das Verzeichnis.
Sonst klappt das hervorragend. Poste doch mal Deine Fehlermeldung.

alpha

Verfasst: Dienstag 27. Januar 2004, 17:29
von N17R0
... ich krieg keine Fehlermeldung. der erstellt die Exe ohne irgendwelche Probleme, aber wenn ich die exe dann anklicke, kommt für nen paar sekunden die sanduhr und dann war's das.
Hier ma der Mitschnitt aus der Eingabeaufforderung:

Code: Alles auswählen

running py2exe
*** searching for required modules ***
*** parsing results ***
creating python loader for extension '_sre'
creating python loader for extension 'datetime'
creating python loader for extension '_tkinter'
*** finding dlls needed ***
*** create binaries ***
*** byte compile python files ***
skipping byte-compilation of D:\PROGRA~1\Python\lib\lib-tk\Canvas.py to Canvas.pyc
skipping byte-compilation of D:\PROGRA~1\Python\lib\lib-tk\FixTk.py to FixTk.pyc
skipping byte-compilation of D:\PROGRA~1\Python\lib\copy_reg.py to copy_reg.pyc
skipping byte-compilation of D:\PROGRA~1\Python\lib\sre_compile.py to sre_compile.pyc
skipping byte-compilation of D:\PROGRA~1\Python\lib\locale.py to locale.pyc
byte-compiling D:\PROGRA~1\Python\build\bdist.win32\winexe\temp\_sre.py to _sre.pyc
skipping byte-compilation of D:\PROGRA~1\Python\lib\macpath.py to macpath.pyc
skipping byte-compilation of D:\PROGRA~1\Python\lib\popen2.py to popen2.pyc
byte-compiling D:\PROGRA~1\Python\build\bdist.win32\winexe\temp\datetime.py to datetime.pyc
skipping byte-compilation of D:\PROGRA~1\Python\lib\atexit.py to atexit.pyc
skipping byte-compilation of D:\PROGRA~1\Python\lib\calendar.py to calendar.pyc
skipping byte-compilation of D:\PROGRA~1\Python\lib\lib-tk\tkCommonDialog.py to tkCommonDialog.pyc
skipping byte-compilation of D:\PROGRA~1\Python\lib\posixpath.py to posixpath.pyc
byte-compiling D:\PROGRA~1\Python\build\bdist.win32\winexe\temp\_tkinter.py to _tkinter.pyc
skipping byte-compilation of D:\PROGRA~1\Python\lib\linecache.py to linecache.pyc
skipping byte-compilation of D:\PROGRA~1\Python\lib\sre_constants.py to sre_constants.pyc
skipping byte-compilation of D:\PROGRA~1\Python\lib\re.py to re.pyc
skipping byte-compilation of D:\PROGRA~1\Python\lib\ntpath.py to ntpath.pyc
skipping byte-compilation of D:\PROGRA~1\Python\lib\stat.py to stat.pyc
skipping byte-compilation of D:\PROGRA~1\Python\lib\lib-tk\Tkinter.py to Tkinter.pyc
skipping byte-compilation of D:\PROGRA~1\Python\lib\string.py to string.pyc
skipping byte-compilation of D:\PROGRA~1\Python\lib\warnings.py to warnings.pyc
skipping byte-compilation of D:\PROGRA~1\Python\lib\UserDict.py to UserDict.pyc
skipping byte-compilation of D:\PROGRA~1\Python\lib\repr.py to repr.pyc
skipping byte-compilation of D:\PROGRA~1\Python\lib\copy.py to copy.pyc
skipping byte-compilation of D:\PROGRA~1\Python\lib\types.py to types.pyc
skipping byte-compilation of D:\PROGRA~1\Python\lib\sre.py to sre.pyc
skipping byte-compilation of D:\PROGRA~1\Python\lib\traceback.py to traceback.pyc
skipping byte-compilation of D:\PROGRA~1\Python\lib\lib-tk\Tkconstants.py to Tkconstants.pyc
skipping byte-compilation of D:\PROGRA~1\Python\lib\whrandom.py to whrandom.pyc
skipping byte-compilation of D:\PROGRA~1\Python\lib\os2emxpath.py to os2emxpath.pyc
skipping byte-compilation of D:\PROGRA~1\Python\lib\_strptime.py to _strptime.pyc
skipping byte-compilation of D:\PROGRA~1\Python\lib\lib-tk\tkMessageBox.py to tkMessageBox.pyc
skipping byte-compilation of D:\PROGRA~1\Python\lib\sre_parse.py to sre_parse.pyc
skipping byte-compilation of D:\PROGRA~1\Python\lib\os.py to os.pyc
*** copy extensions ***
*** copy dlls ***
copying D:\PROGRA~1\Python\lib\site-packages\py2exe\run_w.exe -> D:\PROGRA~1\Python\dist\renamer2.exe
Meine setup.py sieht so aus:

Code: Alles auswählen

#!/usr/bin/env python

from distutils.core import setup
import py2exe

setup(windows=["renamer2.py"],
     )
Das einzige, was ich mir noch vorstellen könnte, dass es an meinem Programm liegt, aber nen Proggy über die Console geht ja. Kannes sein, dasses daran liegt, dass ich in meinem Programm nicht mit classen gearbeitet habe? Über python -> edit -> run script funktioniert es aber.

Greetz

Verfasst: Mittwoch 28. Januar 2004, 10:13
von HarryH
Hallo,

Welche py2exe- Version verwendest du?
Welche Dateien werden bei der Konvertierung erstellt (Dateinamen)?

Verfasst: Mittwoch 28. Januar 2004, 13:36
von Gast
hiho,
ich nehm die version 0.5.0

Dateien:

_sre.pyd
_tkinter.pyd
datetime.pyd
library.zip
python23.dll
renamer2.exe
tcl84.dll
tk84.dll
w9xpopen.exe
zlib.pyd

Ordner:

tcl

Verfasst: Mittwoch 28. Januar 2004, 14:13
von HarryH
Hi,

Bei der Version 0.5.0 von py2exe legt er eine logdatei an, wenn du die exe-Datei startest und ein Fehler in deinem Programm enthalten ist.
Tut er dies nicht kannst du schon mal davon ausgehen das beim Start deines Programms kein Fehler enthalten ist.
Der Fehler muss dann außerhalb deines Programms zu finden sein.
Mehr weiß ich momentan leider auch nicht.

Verfasst: Mittwoch 28. Januar 2004, 16:50
von N17R0
hmm... ok, thx. gut zu wissen, dass ich nich nochma allet neu machen muss ;) ... mal sehen ob jemand anders weiter helfen kann

Verfasst: Mittwoch 11. Februar 2004, 16:17
von N17R0
Kann mir vielleicht jemand nen quellcode für nen leeres Fenster mit TkInter schreiben? vielleicht vergess ich ja was.... ich meine irgendeinen grund muss es ja geben, dass es nicht funktioniert.

Greetz

Verfasst: Mittwoch 11. Februar 2004, 17:16
von Dookie

Code: Alles auswählen

#!/usr/bin/env python
# -*- coding: UTF-8 -*-

from Tkinter import *
mywin = Tk()
mywin.mainloop()
Gruß

Dookie

Verfasst: Mittwoch 11. Februar 2004, 17:20
von Milan
N17R0 hat geschrieben:Kann mir vielleicht jemand nen quellcode für nen leeres Fenster mit TkInter schreiben? vielleicht vergess ich ja was.... ich meine irgendeinen grund muss es ja geben, dass es nicht funktioniert.

Greetz
Bei weitergehenden Fragen dann aber bitte ins Gui-Forum posten, man verliert sonst die Orientierung.

danke, Milan

Verfasst: Freitag 13. Februar 2004, 19:00
von Gast
DANKE DANKE DANKE!!!!
hab das mainloop() vergessen :oops:

THX! funktionuddelt