Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #54689

Re: Making it a MultiThread!

From Piet van Oostrum <piet@vanoostrum.org>
Newsgroups comp.lang.python
Subject Re: Making it a MultiThread!
Date 2013-09-24 07:28 -0400
Message-ID <m2zjr2ihmc.fsf@cochabamba.vanoostrum.org> (permalink)
References <49c2ddff-9b80-4c0f-9272-2691f5f752d0@googlegroups.com> <19013711-d0c9-44a3-a8e2-b9d50eaea599@googlegroups.com> <m2zjr5pt5e.fsf@cochabamba.vanoostrum.org> <56a86018-a4f5-4df1-8372-f200902fd531@googlegroups.com>

Show all headers | View raw


stas poritskiy <stascrash@gmail.com> writes:

> Thanks for getting back to me, so i assume it is OK to have a very
> very long file? The sample code i posted here is basically the
> barebones of the main app.
> so, combining the GUI-file(gui.py) with main code is acceptable?
> Separating them into modules was initially the attempt to keep things
> in order.

Keeping things in separate modules is still OK. Just don't use circular
imports. Keeping the logic of your applcation and the GUI in separate
files is usually a good idea. And make sure the dependencies between the
modules are simple. Very, very long files usually are not a good idea.

Also you imported multiprocessing through anothe module. This obscures
the structure of the application, and is unnecesary. You should only
access a module through another module if you add a layer of abstraction
that makes it easier or more powerful.
-- 
Piet van Oostrum <piet@vanoostrum.org>
WWW: http://pietvanoostrum.com/
PGP key: [8DAE142BE17999C4]

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Making it a MultiThread! stas poritskiy <stascrash@gmail.com> - 2013-09-20 05:56 -0700
  Re: Making it a MultiThread! stas poritskiy <stascrash@gmail.com> - 2013-09-20 09:11 -0700
    Re: Making it a MultiThread! Piet van Oostrum <piet@vanoostrum.org> - 2013-09-21 21:00 -0400
      Re: Making it a MultiThread! Chris Angelico <rosuav@gmail.com> - 2013-09-22 11:18 +1000
      Re: Making it a MultiThread! stas poritskiy <stascrash@gmail.com> - 2013-09-23 07:14 -0700
        Re: Making it a MultiThread! Piet van Oostrum <piet@vanoostrum.org> - 2013-09-24 07:28 -0400

csiph-web