Go Back   Rhinocerus > Newsgroup > Newsgroup comp.lang.python

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 07-22-2012, 09:48 PM
Dennis Lee Bieber
Guest
 
Posts: n/a
Default Re: A thread import problem

On Sun, 22 Jul 2012 13:04:25 -0600, Bruce Sherwood
<bruce.sherwood@gmail.com> declaimed the following in
gmane.comp.python.general:


> Another way of saying this is that I'm not building an app, in which
> case I would structure things in a simple and straightforward manner.
> I am instead trying to maintain and update a library that allows
> novice programmers to write programs that generate real-time navigable
> 3D animations, writing minimalist programs that work cross-platform.
>

I suspect you don't need to update the library so much as enforce a
project style that prevents your import-thread-import cycle. In short,
something like that hypothetical "runner()" design.

Oh, and document that style in detail: "importable modules shall
only perform module level definition of entities during import -- no
code that actually processes data"; "importable modules shall make use
of the 'if __name__ == "__main__": main()' convention to identify when
the module is being used stand-alone, and thereby invoke the main
processing; otherwise the module.main() function is to be invoked only
be the module doing the imports, after the import has completed"
etc.

--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/

Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

Reply

Thread Tools
Display Modes

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 On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT. The time now is 07:07 PM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.