Fix error preventing python script to run on Linux
note by yquemener: catching (and ignoring) exceptions on `root.iconbitmap(default=datafile)` allows the program to runmaster
parent
98c156fb6d
commit
c7ea1fc3b9
|
@ -25,7 +25,10 @@ if not hasattr(sys, "frozen"): ## Check if not
|
|||
datafile = os.path.join(os.path.dirname(__file__), datafile)## Use icon file reside in same directory as script
|
||||
else: ## But if it is running from exe
|
||||
datafile = os.path.join(sys.prefix, datafile) ## Use icon file from the temporary system directory
|
||||
root.iconbitmap(default=datafile) ## Declare the small icon shown on window
|
||||
try:
|
||||
root.iconbitmap(default=datafile) ## Declare the small icon shown on window
|
||||
except:
|
||||
pass
|
||||
|
||||
##[1]---------------Declare the frames inside container
|
||||
TopMainFrame = Frame(root, width=450, height=7, bg="grey", bd=8)
|
||||
|
@ -103,4 +106,4 @@ EntOutput.grid(row=1,column=1)
|
|||
EntInput.bind("<Return>", (lambda event: conUnicode()))
|
||||
|
||||
##[3]---------------Make sure program GUI continues to run unless exited
|
||||
root.mainloop()
|
||||
root.mainloop()
|
||||
|
|
Loading…
Reference in New Issue