FAQ
Please help me.
How do you clear the screen and then display a number with an enlarged font
size (about 300).
Adam.

Search Discussions

  • Fredrik Lundh at Feb 15, 2005 at 9:30 pm

    "Adam" 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>
  • BOOGIEMAN at Feb 15, 2005 at 10:31 pm

    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")
  • Adam at Feb 16, 2005 at 1:15 am
    "BOOGIEMAN" <BOOGIEMANPN at YAHOO.COM> wrote in message
    news:ldzqyx6byqdw$.wt8smryc0t3.dlg at 40tude.net...
    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.
  • Adam at Feb 17, 2005 at 12:07 am
    "Adam" <adam at eden.com> wrote in message
    news:42129ea1 at news.comindico.com.au...
    "BOOGIEMAN" <BOOGIEMANPN at YAHOO.COM> wrote in message
    news:ldzqyx6byqdw$.wt8smryc0t3.dlg at 40tude.net...
    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.
  • Jeff Shannon at Feb 17, 2005 at 12:33 am

    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
  • Peter Hansen at Feb 17, 2005 at 1:38 am

    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
  • Mensanator at Feb 17, 2005 at 7:04 am

    Adam wrote:
    "Adam" <adam at eden.com> wrote in message
    news:42129ea1 at news.comindico.com.au...
    "BOOGIEMAN" <BOOGIEMANPN at YAHOO.COM> wrote in message
    news:ldzqyx6byqdw$.wt8smryc0t3.dlg at 40tude.net...
    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?

    @@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@ @@@@@@@@@@@
    @@@@@@@@ @@@@@@@@@@
    @@@@@@@@ @@@@@@@@@@
    @@@@@@@@ @@@@@@@@@@
    @@@@@@@@ @@@@@@@@@@
    @@@@@@@@ @@@@@@@@@@
    @@@@@@@@ @@@@@@@@@@
    @@@@@@@@ @@@@@@@@@@
    @@@@@@@@ @@@@@@@@@@
    @@@@@@@@ @@@@@@@@@@
    @@@@@@@@ @@@@@@@@@@
    @@@@@@@@ @@@@@@@@@@
    @@@@@@@@ @@@@@@@@@@
    @@@@@@@@ @@@@@@@@@@
    @@@@@@@@@ @@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@@@@@@@
    @@@@@@@@@@@@@@@@@@@@
  • Fredrik Lundh at Feb 17, 2005 at 7:45 am

    "Adam" 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>





    From http Thu Feb 17 08:41:51 2005
    From: http (Paul Rubin)
    Date: 16 Feb 2005 23:41:51 -0800
    Subject: Pausing a program - poll/sleep/threads?
    References: <[email protected]>
    Message-ID: <[email protected]>

    "Simon John" <simoninusa2001 at yahoo.co.uk> writes:
    So, how would I make a Python program automatically call a function
    after a preset period of time, without the Python process running in
    the foreground (effectively single-tasking)?
    See the signal module and use the alarm signal.
  • Adam at Feb 18, 2005 at 12:00 am
    "Fredrik Lundh" <fredrik at pythonware.com> wrote in message
    news:mailman.2740.1108626296.22381.python-list at python.org...
    "Adam" 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.
  • Adam at Feb 18, 2005 at 9:53 pm
    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.
  • Tobiah at Feb 24, 2005 at 4:29 pm

    from random import randint
    rand = randint(0,36)
    print rand

    Don't forget about the double zero slot.

    Tobiah

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedFeb 15, '05 at 9:22p
activeFeb 24, '05 at 4:29p
posts12
users7
websitepython.org

People

Translate

site design / logo © 2023 Grokbase