Re: A thread import problem

Discussion in 'Python' started by Dennis Lee Bieber, Jul 22, 2012.

  1. On Sun, 22 Jul 2012 13:04:25 -0600, Bruce Sherwood
    <> 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
    HTTP://wlfraed.home.netcom.com/
    Dennis Lee Bieber, Jul 22, 2012
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stefan Seefeld
    Replies:
    3
    Views:
    958
  2. per9000
    Replies:
    7
    Views:
    403
    Magnus Lycka
    Feb 27, 2006
  3. Bruce Sherwood

    A thread import problem

    Bruce Sherwood, Jul 19, 2012, in forum: Python
    Replies:
    0
    Views:
    155
    Bruce Sherwood
    Jul 19, 2012
  4. Dennis Lee Bieber

    Re: A thread import problem

    Dennis Lee Bieber, Jul 19, 2012, in forum: Python
    Replies:
    0
    Views:
    169
    Dennis Lee Bieber
    Jul 19, 2012
  5. Dieter Maurer

    Re: A thread import problem

    Dieter Maurer, Jul 19, 2012, in forum: Python
    Replies:
    0
    Views:
    141
    Dieter Maurer
    Jul 19, 2012
Loading...

Share This Page