Newbie: Why Does This Work This Way...Global Variables And The Signal Module....

John Branthoover jbranthoover at
Fri Sep 14 03:25:31 CEST 2001

Hello Ingacio,
    OK,  that makes sense.  Is there not away to define a global variable
once for all of the functions in the module?

    Or better yet,  is there a better way to break out of a endless loop.
The loop will display some values continuously.  I want to be able to get
out of this loop and go back to a main menu.  I am working on an Lynx box
(not Linux) with no GUI or even curses support.

    Thanks for taking the time to answer "both" of my questions.  Take care
and have fun.....

"Ignacio Vazquez-Abrams" <ignacio at> wrote in message
news:mailman.1000420294.24696.python-list at
> On Thu, 13 Sep 2001, John Branthoover wrote:
> >     I have written a simple program to break out of a endless loop by
> > hitting control C,  see below.  This program works OK but I don't
> > why I have to define the global variable "Loop_Run" twice to get it to
> > I thought that you had only to define a global variable once at the
> > beginning of a program and that made it available to rest of the module.
> You haven't defined it twice; you have only told two different functions
> it is a global variable.
> --
> Ignacio Vazquez-Abrams  <ignacio at>

More information about the Python-list mailing list