[Tutor] display-related questions

Richard Chamberlain richard_chamberlain@ntlworld.com
Sun, 9 Jul 2000 07:59:31 +0100


1:

mylong=12190912912L
print `mylong`[:-1]

2:
from Tkinter import *
root=Tk()
mbar=Frame(root)

filebutton=Menubutton(mbar,text='File')
filemenu = Menu(filebutton, tearoff=0)
filebutton['menu']=filemenu
filemenu.add('command', label = 'Open etc')
filebutton.pack(side=LEFT)

helpbutton = Menubutton(mbar, text = 'Help')
helpmenu=Menu(helpbutton,tearoff=0)
helpbutton['menu']=helpmenu
helpmenu.add('command',label='Help things')
helpbutton.pack(side = RIGHT)

mbar.pack(side=TOP,fill=X,expand=1,anchor=N)
root.mainloop()


Richard
----- Original Message -----
From: Sean Dwyer <ewe2@can.org.au>
To: <tutor@python.org>
Sent: Saturday, July 08, 2000 11:56 PM
Subject: [Tutor] display-related questions


> I have two questions:
>
> 1. I'm writing an innocuous command-line fibonacci numbers program. So
that
> users can input almost any size number to determine the length of the
> sequence, I've had to use long integers.
>
> Unfortunately this also output every number with a long integer indicator
(eg
> 987L). Is it possible to avoid this in output, and how?
>
> 2. my second question is Tkinter-related, and is probably simpler: what's
the
> best way to right-justify a main menu item, such as Help?
>
> thanks,
>
> sean
>
> --
> The Mdate Development Team
> Project Admin : Sean Dwyer <ewe2@users.sourceforge.net>
> Web: http://mdate.sourceforge.net/
>
> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> http://www.python.org/mailman/listinfo/tutor