I've been having problems running my python program on the mac.
Opening without the IDLE:
Firstly, whenever I open the program it opens with the IDLE by default. I would like it to open with the launcher, but when I tried opening it with the launcher, it came up with a preferences window that had no "Ok", "Next", or "Continue" button.
On Windows, if you open a python program, then by default it will run it with the launcher, causing it to go directly into the program without the user needing to go through any other windows. The .pyw
extension can also be used to make it run without the console. How would I set the Mac so that it does this?
Background of tkinter buttons:
In the following function I have a menu with several buttons:
def MainMenu():
Move() # This clears any widgets that are on the screen.
Win.unbind("<Up>") # Win is the name of my window.
Win.unbind("<Down>")
Win.unbind("<Return>")
Win.config(bg="#FFFF00")
try:Welcome=GUI.Label(Win,text="Welcome "+Name+("."if Name[-1]!="."else"")+"\nYou should have £"+str(Cash)+("0"if str(Cash)[-2]=="."else"")+".\n What would you like to do?",bg="#FFFF00") # GUI is the variable containing the tkinter library.
except IndexError:Welcome=GUI.Label(Win,text="Welcome "+Name+".\nYou should have £"+str(Cash)+".\n What would you like to do?",bg="#FFFF00")
Welcome.place(x=0,y=0)
ManualButton=GUI.Button(Win,text="Manual adjustment.",width=96,height=4,command=ManualChange,bg="#FFFF00")
ManualButton.place(x=0,y=0)
RecButton=GUI.Button(Win,text="Recall.",width=96,height=4,command=Recall,bg="#00FF00")
RecButton.place(x=0,y=0)
Setti=GUI.Button(Win,text="Settings",command=Settings,bg="#FFFF00",width=96,height=4)
Setti.place(x=4,y=4)
if Set:
RecoButton=GUI.Button(Win,text="Record spending.",width=96,height=4,command=Spending,bg="#FF80C0")
RecoButton.place(x=256,y=14)
Win.update_idletasks()
Welcome.place(x=Win.winfo_width()//2-Welcome.winfo_width()//2,y=16)
ManualButton.place(x=Win.winfo_width()//2-ManualButton.winfo_width()//2,y=256)
RecButton.place(x=Win.winfo_width()//2-ManualButton.winfo_width()//2,y=192)
if Set:RecoButton.place(x=Win.winfo_width()//2-ManualButton.winfo_width()//2,y=128)
Setti.place(x=Win.winfo_width()//2-ManualButton.winfo_width()//2,y=340)
Win.update()
Here is a picture of the menu it creates (Name="S", Cost=8805.33, Set=True
):
This is what it looks like on a Mac (Name="S", Cost=96, Set=True
):
I would like to make the buttons look more like they do on Windows, or at least get rid of the grey space around the buttons. Does anyone have any idea how I'd do this?