Re: How do I import a variable from another module?

2007-05-03 Thread Steven D'Aprano
On Thu, 03 May 2007 18:27:12 -0700, noagbodjivictor wrote: > I have a variable names actions in a module named qt_actions.py > > Well this is what I get: import qt_actions qt_actions.actions > Traceback (most recent call last): > File "", line 1, in > AttributeError: 'module' object

Re: How do I import a variable from another module?

2007-05-03 Thread sykora
On May 4, 6:39 am, [EMAIL PROTECTED] wrote: > On May 3, 9:36 pm, Andy Terrel <[EMAIL PROTECTED]> wrote: > > > are you sure your variable isn't in some code block that wouldn't be > > read on import? Such as: > > > if __name__ == "__main___": > > actions = 1 > > No Andy, I have not put the var

Re: How do I import a variable from another module?

2007-05-03 Thread noagbodjivictor
On May 3, 9:36 pm, Andy Terrel <[EMAIL PROTECTED]> wrote: > are you sure your variable isn't in some code block that wouldn't be > read on import? Such as: > > if __name__ == "__main___": > actions = 1 No Andy, I have not put the variable in any code block -- http://mail.python.org/mailman

Re: How do I import a variable from another module?

2007-05-03 Thread Andy Terrel
are you sure your variable isn't in some code block that wouldn't be read on import? Such as: if __name__ == "__main___": actions = 1 -- http://mail.python.org/mailman/listinfo/python-list

How do I import a variable from another module?

2007-05-03 Thread noagbodjivictor
I have a variable names actions in a module named qt_actions.py Well this is what I get: >>> import qt_actions >>> qt_actions.actions Traceback (most recent call last): File "", line 1, in AttributeError: 'module' object has no attribute 'actions' -- http://mail.python.org/mailman/listinfo/py