Function not available after importing module

David Bolen db3l at fitlinxx.com
Thu Jul 1 00:27:03 CEST 2004


Stephen Boulet <stephendotboulet at motorola_._com> writes:

> When I do an "import wxMessageBox" I don't see my "askopenfilename"
> function in the wxMessageBox namespace.

Can you show the actual code (or an interactive session) that shows
the error you get?  I believe that given the module you show, you
should be able to:

    import wxMessageBox

    print wxMessageBox.askopenfilename(startdir="C:\\")    

for example, within your main module.

Could you be forgetting to qualify the askopenfilename name with its
wxMessageBox module?

-- David



More information about the Python-list mailing list