Re: Handling global variables (Newbie)

2008-03-15 Thread Gabriel Genellina
En Thu, 13 Mar 2008 02:25:12 -0200, David S <[EMAIL PROTECTED]> escribi�: > I have an error occurring at > self.build_root = os.path.abspath(os.path.split(__file__)[0]) > > The error states 'NameError: global name '__file__' is not defined' > > In Python 2.5 I ran my script as a module in ID

Re: Handling global variables (Newbie)

2008-03-14 Thread Marc 'BlackJack' Rintsch
On Fri, 14 Mar 2008 12:19:18 -0700, MRAB wrote: > On Mar 13, 4:25 am, "David S" <[EMAIL PROTECTED]> wrote: >> Hi, >> >> I have an error occurring at >> self.build_root = os.path.abspath(os.path.split(__file__)[0]) >> >> The error states 'NameError: global name '__file__' is not defined' >>

Re: Handling global variables (Newbie)

2008-03-14 Thread MRAB
On Mar 13, 4:25 am, "David S" <[EMAIL PROTECTED]> wrote: > Hi, > > I have an error occurring at > self.build_root = os.path.abspath(os.path.split(__file__)[0]) > > The error states 'NameError: global name '__file__' is not defined' > > In Python 2.5 I ran my script as a module in IDLE gui.

Handling global variables (Newbie)

2008-03-12 Thread David S
Hi, I have an error occurring at self.build_root = os.path.abspath(os.path.split(__file__)[0]) The error states 'NameError: global name '__file__' is not defined' In Python 2.5 I ran my script as a module in IDLE gui. How does _file_ get defined? Yours, David -- http://mail.python.