[PLUG] A Python Syntax Question

Dan Young danielmyoung at gmail.com
Tue Nov 22 01:58:38 UTC 2005


On 11/21/05, Rich Shepard <rshepard at appl-ecosys.com> wrote:
>    I've a Python beginner's question on referencing a separate module from the
> module that holds the application invocation code. I'd appreciate having a
> clue stick passed my way.
>
>    Here's the pertinent line in eikos.py:
>
> class Eikos(wx.App):
>    def OnInit(self):
>      wx.InitAllImageHandlers()
>      self.main = mainFrame(None)

Does eikos.py import the module?

I think you want to either call it as:
import <yourmodule>
...
self.main = <yourmodule>.mainFrame(None)

or

import * from <yourmodule>
...
self.main = mainFrame(None)

--
Dan Young



More information about the PLUG mailing list