py2exe prob mit GUI's

Wenn du dir nicht sicher bist, in welchem der anderen Foren du die Frage stellen sollst, dann bist du hier im Forum für allgemeine Fragen sicher richtig.
Antworten
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
alpha
User
Beiträge: 195
Registriert: Freitag 23. Mai 2003, 23:24
Wohnort: Ulm

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
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
HarryH
User
Beiträge: 266
Registriert: Freitag 23. Mai 2003, 09:08
Wohnort: Deutschland

Hallo,

Welche py2exe- Version verwendest du?
Welche Dateien werden bei der Konvertierung erstellt (Dateinamen)?
Gruß, Harry
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
HarryH
User
Beiträge: 266
Registriert: Freitag 23. Mai 2003, 09:08
Wohnort: Deutschland

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.
Gruß, Harry
N17R0

hmm... ok, thx. gut zu wissen, dass ich nich nochma allet neu machen muss ;) ... mal sehen ob jemand anders weiter helfen kann
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
Dookie
Python-Forum Veteran
Beiträge: 2010
Registriert: Freitag 11. Oktober 2002, 18:00
Wohnort: Salzburg
Kontaktdaten:

Code: Alles auswählen

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

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

Dookie
Milan
User
Beiträge: 1078
Registriert: Mittwoch 16. Oktober 2002, 20:52

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
Gast

DANKE DANKE DANKE!!!!
hab das mainloop() vergessen :oops:

THX! funktionuddelt
Antworten