global variables - how??

Matt Dunford kno at
Wed Apr 12 20:02:32 EDT 2000

I usually set a module aside for global variables:

import glob_vars
glob_vars.count = 6

def printme( num ):
  print num

printme( glob_vars.count )

you get the idea...

"Anders Eggers-Krag" <aek at> writes:

>how do I define a propper global variable that works in all functions in all

>I have tried simply
>defining one outside of any function in the main module,
>I have tried using the global keyword under the same cicumstances,
>but they are not even avialible inside of functions within the main

>Anders Eggers - Krag


More information about the Python-list mailing list