Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old June 27th, 2008, 05:24 PM
Stef Mientki
Guest
 
Posts: n/a
Default how to reference my own module ?

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



 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles