Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #25829
| Path | csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python-python-list@m.gmane.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.004 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; '"__main__":': 0.07; '__name__': 0.07; 'app,': 0.09; 'oh,': 0.09; 'prevents': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'library': 0.15; 'animations,': 0.16; 'hypothetical': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:import': 0.16; 'saying': 0.18; 'module': 0.19; 'trying': 0.21; 'import': 0.21; 'subject:problem': 0.22; 'bruce': 0.23; 'allows': 0.25; 'convention': 0.27; 'header:X-Complaints-To:1': 0.28; 'enforce': 0.29; 'invoke': 0.29; 'definition': 0.29; "i'm": 0.29; 'function': 0.30; 'code': 0.31; 'structure': 0.32; 'real- time': 0.33; 'url:home': 0.33; 'to:addr:python-list': 0.33; 'another': 0.33; 'project': 0.34; 'doing': 0.35; 'something': 0.35; 'received:org': 0.36; 'modules': 0.36; 'programmers': 0.36; 'charset:us-ascii': 0.36; 'level': 0.37; 'being': 0.37; 'subject:: ': 0.38; 'perform': 0.38; 'things': 0.38; 'instead': 0.39; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'your': 0.60; 'identify': 0.61; 'jul': 0.65; 'manner.': 0.66; "'if": 0.84; 'dennis': 0.91; 'novice': 0.91 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| To | python-list@python.org |
| From | Dennis Lee Bieber <wlfraed@ix.netcom.com> |
| Subject | Re: A thread import problem |
| Date | Sun, 22 Jul 2012 17:48:21 -0400 |
| Organization | > Bestiaria Support Staff < |
| References | <CA+WuaSeRExxaD9yCNWhXoWqsV_ZqP8DOvdErMRdNS-H_UtzQyg@mail.gmail.com> <87a9yt7bw6.fsf@handshake.de> <CA+WuaSc0Rm5s0CXsm7q7-gfyw+jQxpAGkuajpgFyoAHnTP12sQ@mail.gmail.com> <2u8m085co3j3n97jorkl04o5hr1orqb7la@invalid.netcom.com> <CA+WuaSde=GntxGMVTScOUw4_a+jqQS+nme0VpZVgH_219Qo9jA@mail.gmail.com> <5gfm08htgbrum782hfv5fqkb4084qra7vq@invalid.netcom.com> <CA+WuaScB1jycdBNPosEePGUX=8n80Wst3tGv672TK2FVq-KAig@mail.gmail.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Transfer-Encoding | 7bit |
| X-Gmane-NNTP-Posting-Host | adsl-76-249-26-210.dsl.klmzmi.sbcglobal.net |
| X-Newsreader | Forte Agent 3.3/32.846 |
| X-No-Archive | YES |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2441.1342993706.4697.python-list@python.org> (permalink) |
| Lines | 28 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1342993706 news.xs4all.nl 6929 [2001:888:2000:d::a6]:55657 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:25829 |
Show key headers only | View raw
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/
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: A thread import problem Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-07-22 17:48 -0400
csiph-web