Re: Font size
from random import randint rand = randint(0,36) print rand Don't forget about the double zero slot. Tobiah -- http://mail.python.org/mailman/listinfo/python-list
Re: Font size
Thanks Fredrik, I got your program running (with a couple of tweaks) with just a quarter of an hour to spare before using it at our happy hour yesterday. The old ladies loved it. I can now adapt it for bingo. Thanking you Adam. -- http://mail.python.org/mailman/listinfo/python-list
Re: Font size
Fredrik Lundh [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Adam [EMAIL PROTECTED] wrote: So we came up with the idea of using a random number generator to generate numbers from 0 to 36 and display them in large figures on my laptop. This is for the benefit of those people who are hard of hearing. They like to see what is happening. here's one way to do this: from Tkinter import * from random import randint from time import sleep def update(event=None): for i in range(10): label.config(text=str(randint(0,36))) label.update() sleep(0.05) # create a maximized window root = Tk() root.wm_state(zoomed) root.title(my roulette wheel) # 80% of the screen height height = int(root.winfo_screenheight() * 0.8) # create label (use negative font size for size in pixels) label = Label(root, font=Arial + str(-height), bg=gold) label.pack(fill=BOTH, expand=1) # click anywhere in window to pick a new number root.bind(Button-1, update) update() # display first number mainloop() (tweak as necessary) /F I thank all of you. I will try each one of these suggestions. Adam. -- http://mail.python.org/mailman/listinfo/python-list
Re: Font size
Adam [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] BOOGIEMAN [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Tue, 15 Feb 2005 21:22:43 GMT, Adam wrote: Please help me. How do you clear the screen and then display a number with an enlarged font size (about 300). Adam. To clear screen in windows : #at the beggining of the program import os #when you want to clear the screen os.system(cls) Thanks I'll try that. Adam. Unfortunately that didn't work. Here's what I'm trying to do. We are running a numbers game at our retirement village and using a roulette wheel to generate the numbers. but this wheel is only about 12 in diameter and is little more than a toy. So we came up with the idea of using a random number generator to generate numbers from 0 to 36 and display them in large figures on my laptop. This is for the benefit of those people who are hard of hearing. They like to see what is happening. I was an RPG programmer before retirement but am new to Python. So I used the following code to generate the numbers but I don't know how to display them in large figures (about 3 ins high) or get rid of the idle text. from random import randint rand = randint(0,36) print rand my os = XP Can you help? Adam. -- http://mail.python.org/mailman/listinfo/python-list
Re: Font size
Adam wrote: Here's what I'm trying to do. We are running a numbers game at our retirement village and using a roulette wheel to generate the numbers. but this wheel is only about 12 in diameter and is little more than a toy. So we came up with the idea of using a random number generator to generate numbers from 0 to 36 and display them in large figures on my laptop. This is for the benefit of those people who are hard of hearing. They like to see what is happening. I was an RPG programmer before retirement but am new to Python. So I used the following code to generate the numbers but I don't know how to display them in large figures (about 3 ins high) or get rid of the idle text. The problem is that console displays don't support variable font sizes. In order to do this, you're going to need to write a simple GUI program, which will be significantly more complex. A simple program to display a random number in large text should be relatively easy to do in Tkinter, which has the benefit of being bundled with your Python distribution. (It's got a few downsides, too, but most of them won't apply for this project.) I haven't actually looked at it, but EasyGui (recently mentioned here; google should help you find it) may meet your needs and be simpler to use. Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list
Re: Font size
Adam wrote: We are running a numbers game at our retirement village and using a roulette wheel to generate the numbers. but this wheel is only about 12 in diameter and is little more than a toy. So we came up with the idea of using a random number generator to generate numbers from 0 to 36 and display them in large figures on my laptop. This is for the benefit of those people who are hard of hearing. They like to see what is happening. I was an RPG programmer before retirement but am new to Python. So I used the following code to generate the numbers but I don't know how to display them in large figures (about 3 ins high) or get rid of the idle text. from random import randint rand = randint(0,36) print rand my os = XP I'd suggest this as the possible best-bang-for-the-buck solution, at least in terms of quick success. If it's not good enough, at least you've got now a baseline to compare against. In XP, under the Start menu, under All Programs then Accessibility you should find a Magnifier tool. Run this, right-click and change the options to a magnification level of 9, then drag the window somewhere convenient and make it a decent size. Then run your Python script, and move the mouse near where the output shows up. The result is a coarse magnification of the font, as in individual pixels will show up as large squares, but from any kind of distance it's likely to look good enough to be usable... And you don't need to learn a GUI framework to use it. :-) -Peter -- http://mail.python.org/mailman/listinfo/python-list
Re: Font size
Adam wrote: Adam [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] BOOGIEMAN [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Tue, 15 Feb 2005 21:22:43 GMT, Adam wrote: Please help me. How do you clear the screen and then display a number with an enlarged font size (about 300). Adam. To clear screen in windows : #at the beggining of the program import os #when you want to clear the screen os.system(cls) Thanks I'll try that. Adam. Unfortunately that didn't work. Here's what I'm trying to do. We are running a numbers game at our retirement village and using a roulette wheel to generate the numbers. but this wheel is only about 12 in diameter and is little more than a toy. So we came up with the idea of using a random number generator to generate numbers from 0 to 36 and display them in large figures on my laptop. This is for the benefit of those people who are hard of hearing. They like to see what is happening. I was an RPG programmer before retirement but am new to Python. So I used the following code to generate the numbers but I don't know how to display them in large figures (about 3 ins high) or get rid of the idle text. from random import randint rand = randint(0,36) print rand my os = XP Can you help? Adam. What about using banner printing? @@ @@@@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@ @@@@ @@ -- http://mail.python.org/mailman/listinfo/python-list
Re: Font size
Adam [EMAIL PROTECTED] wrote: So we came up with the idea of using a random number generator to generate numbers from 0 to 36 and display them in large figures on my laptop. This is for the benefit of those people who are hard of hearing. They like to see what is happening. here's one way to do this: from Tkinter import * from random import randint from time import sleep def update(event=None): for i in range(10): label.config(text=str(randint(0,36))) label.update() sleep(0.05) # create a maximized window root = Tk() root.wm_state(zoomed) root.title(my roulette wheel) # 80% of the screen height height = int(root.winfo_screenheight() * 0.8) # create label (use negative font size for size in pixels) label = Label(root, font=Arial + str(-height), bg=gold) label.pack(fill=BOTH, expand=1) # click anywhere in window to pick a new number root.bind(Button-1, update) update() # display first number mainloop() (tweak as necessary) /F -- http://mail.python.org/mailman/listinfo/python-list
Re: Font size
Adam [EMAIL PROTECTED] wrote: How do you clear the screen and then display a number with an enlarged font size (about 300). what platform? what screen? 300 what? /F -- http://mail.python.org/mailman/listinfo/python-list
Re: Font size
On Tue, 15 Feb 2005 21:22:43 GMT, Adam wrote: Please help me. How do you clear the screen and then display a number with an enlarged font size (about 300). Adam. To clear screen in windows : #at the beggining of the program import os #when you want to clear the screen os.system(cls) -- http://mail.python.org/mailman/listinfo/python-list
Re: Font size
BOOGIEMAN [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Tue, 15 Feb 2005 21:22:43 GMT, Adam wrote: Please help me. How do you clear the screen and then display a number with an enlarged font size (about 300). Adam. To clear screen in windows : #at the beggining of the program import os #when you want to clear the screen os.system(cls) Thanks I'll try that. Adam. -- http://mail.python.org/mailman/listinfo/python-list