Hi, I am very new to python and tried putting this code together in order to get an interface the size of the screenb but a canvas only half as tall:

OFWidth=OedipusFrame.winfo_screenwidth()
OFHeight=OedipusFrame.winfo_screenheight()
OedipusFrame.geometry(("%dx%d")%(OFWidth,OFHeight))
OFSHeight = "%d/2" % OFHeight
OTStart=Tkinter.Canvas(OedipusFrame, bg="blue", height="%d"%OFSHeight, width="%d"%OFWidth)

All equations register correctly, but the frame has errors intaking OFSHeight and OFWidth. To correct this error, how would I format those variables?

I'm not an expert but I think geometry() applies to top level windows only. You may want to call

OedipusFrame.winfo_toplevel().geometry(("%dx%d+0+0")%(OFWidth,OFHeight))

See also here.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.