Project-wide variable...

Noah Hall enalicho at gmail.com
Thu Jun 23 09:59:23 EDT 2011


On Thu, Jun 23, 2011 at 2:41 PM, Gnarlodious <gnarlodious at gmail.com> wrote:
> Is there a way to declare a project-wide variable and use that in all
> downstream modules?

Well, the standard way you should do it is to use import to import a
certain variable - for example -

a.py -

x = 3


>>>from a import x
>>>x
3



More information about the Python-list mailing list