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 u
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
I have a main module doStuff.py and another module utility.py. At the
start of doStuff.py I call
import utility.py
Then I also proceed to initiallize some global variables
sName = ""
Then I create a class, some methods etc. In one of the methods I assign
a value to my variable sName. Th
Thanks a lot Fredrik,
A big wave of deja vu came over me as I read your note. That bit me once
before, and was my only previous run-in with the 'global' directive
which clearly didn't stick with me. :(
Thanks for the concise, helpful reply. The universe makes sense again.
-Ross.
Fredrik
I'm seeing something which make me think I'm missing something about
how global var's behave. I've defined a global string, right at the
start of my .py file.
outXMLfile = "abc"
I define a class and do a bunch of stuff below that. Then I have
another class, and in it, there is a method 'de
Chris Mellon wrote:
This is probably better suited to the wxPython ML instead of c.l.p,
because it's so specific.
In short: wxDC (and friends) are traditional raster based drawing
contexts. wxGraphicsContext is a vector/path based API. If you're
doing drawing that's suited for a vector format (l
Experimenting with graphics in an app: it's AUI based with a few panes,
one of which has a panel containing a few sizers holding UI elements.
One sizer contains a panel that needs some basic line-drawing graphics
in it.
I use the wxPython demo app heavily to figure this stuff out, and my
expe