M.E.Farmer wrote:
alex wrote:
is it possible to create 'global' variables that can be seen in all
other classes?

What about using a class?

Py> class globalVar:
...    pass

Py> globals = globalVar()

Probably naming it something other than 'globals' would be a good idea -- otherwise you'll hide the builtin globals() function.


But I agree that the attributes of a class instance (as you suggest) or the attributes of a module (as Steve Holden suggests) is probably the right way to go.

Steve
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to