Dennis Lee Bieber wrote:
On Wed, 27 Aug 2008 16:21:03 -0400, RgeeK <[EMAIL PROTECTED]>
declaimed the following in comp.lang.python:
I have a main module doStuff.py and another module utility.py. At the
start of doStuff.py I call
import utility.py
I hope not... import utility
Fredrik Lundh wrote:
>>import utility.py
> that tries to import a module named "py" from the package "utility".
oops - that was just a typo in my post - I meant of course "import utility"
>
> Python doesn't have "program-wide global" variables; if you need that,
> create a support module and
Fredrik Lundh wrote:
import utility.py
that tries to import a module named "py" from the package "utility".
oops - that was just a typo in my post - I meant of course "import utility"
Python doesn't have "program-wide global" variables; if you need that,
create a support module and impor
RgeeK wrote:
I have a main module doStuff.py and another module utility.py. At the
start of doStuff.py I call
import utility.py
that tries to import a module named "py" from the package "utility".
Then I also proceed to initiallize some global variables
sName = ""
Within my utility.
Nick Coghlan wrote:
Michael Hoffman wrote:
raver2046 wrote:
How to have a global var in python ?
"global var" will give you a global variable named "var".
Whether this advice is correct or not depends greatly on what the OP
means by 'global' :)
Module global, it's right, application global it's w
Michael Hoffman wrote:
raver2046 wrote:
How to have a global var in python ?
"global var" will give you a global variable named "var".
Whether this advice is correct or not depends greatly on what the OP means by
'global' :)
Module global, it's right, application global it's wrong. Given the nat
raver2046 wrote:
How to have a global var in python ?
You can, but you probably don't want to. What's your use case? Example
code and what you'd like it to do would be helpful.
STeVe
--
http://mail.python.org/mailman/listinfo/python-list
raver2046 wrote:
How to have a global var in python ?
"global var" will give you a global variable named "var".
--
Michael Hoffman
--
http://mail.python.org/mailman/listinfo/python-list