Python Global Constant

Krisztian Kepes Kepes.Krisztian at peto.hu
Wed Jul 9 03:49:15 EDT 2003


Hi !

I want to create an module and I want to use some Global Constant in it.
How to I create an global constant in module what is accessable in from other modules ?

like this example:

*** module dirs ***
const Const_Up=1
const Const_Down=1

*** module any ***
import dirs;
def CheckDir(Dir):
  if Dir=dirs.Const_Up: xxx

?????

Thx:
 Chris










More information about the Python-list mailing list