how to reference my own module ?

S

Stef Mientki

hello,

I've a library that I import as

import ppygui.api as gui

the reason for this construct is that I've to use different libraries
for different platforms.

Now I like to write some examples in the library (activated by if
__name__ == '__main__' :)
and I would that these examples can be used in the user program just by
copy / paste.

For calling a function / class in the user program I've to write:

sizer = gui.VBox ()

So also write exactly the same sentence in the library examples,
but "gui" is not recognized

Any ideas how I can realize the above ?

thanks,
Stef Mientki
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top