ich hab da ein kleines Problem:
folgendes script lässt sich ohne probleme mit py2exe in eine .exe datei umwandeln.
wenn ich aber die drei mit xxxxx gekennzeichneten zeilen unkommentiere, wird zwar auch ohne fehlermeldung kompiliert, aber das programm läuft nicht. bei doppelklick auf die exe öffnet sich kurz ein konsolenfenster, verschwindet aber auch genauso schnell wieder. ansonsten passiert nüscht....
muss ich meine setup.py evtl. für den umgang mit photoimage anpassen???
Code: Alles auswählen
from Tkinter import *
from os import *
from time import *
import tkMessageBox
lt = localtime()
datum = strftime("### Erstellt am %d.%m.%Y um %X \n\n",lt)
def ok():
conf = tkMessageBox.askyesno("Confirm","Neues Projekt anlegen?")
if conf == True:
name = ein.get()
info = text.get(1.0,END)
ein.delete(0,END)
text.delete(1.0,END)
chdir(path)
mkdir(name)
chdir(name)
mkdir("Avid-archiv")
mkdir("Flame")
mkdir("Grafik")
mkdir("mpeg")
mkdir("von_extern")
mkdir("Sound")
infofile = file("info.txt", "w")
infofile.write(datum)
infofile.write(info)
infofile.close()
tkMessageBox.showinfo("erledigt","Verzeichnisse wurden erstellt!")
if conf == False:
print "Projekt nicht angelegt!!!"
root = Tk()
path = path.join("p:","\Projects")
fimage = Frame(root)
fimage.pack(expand=YES,fill=BOTH)
fspace = Frame(root)
fspace.pack(expand=YES,fill=BOTH)
foben = Frame(root)
foben.pack(expand=YES,fill=BOTH)
funten = Frame(root,width=100)
funten.pack(expand=YES,fill=BOTH)
spacelab = Label(fspace,text="\n")
spacelab.pack()
lob = Label(foben,text="Neues Projekt:")
lob.pack(side = LEFT)
#img = PhotoImage(file="deli.gif") xxxxxxx
#imglab = Label(fimage,image=img) xxxxxxx
#imglab.pack(side=TOP) xxxxxxx
ein = Entry(foben,width=25)
ein.pack()
lut = Label(funten,text="\n\nInfo:")
lut.pack(side = TOP)
text = Text(funten,width=40,height=6)
text.pack()
but = Button(root,text="Anlegen",command=ok)
but.pack()
root.mainloop()