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


Groups > comp.lang.python > #20099

Re: multiple namespaces within a single module?

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed5.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.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'subject:module': 0.04; 'python': 0.08; 'module?': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'rename': 0.09; 'files.': 0.09; '.py': 0.16; 'received:dip.t-dialin.net': 0.16; 'received:t-dialin.net': 0.16; 'wrote:': 0.18; '(perhaps': 0.18; 'so.': 0.22; 'from:addr:web.de': 0.23; 'classes': 0.26; 'script': 0.28; 'subject:?': 0.31; 'app': 0.31; 'file.': 0.31; 'modules': 0.32; 'file': 0.34; 'header:X-Complaints-To:1': 0.34; 'to:addr:python- list': 0.35; 'received:org': 0.36; 'run': 0.37; 'reasons': 0.37; 'think': 0.38; 'that.': 0.39; 'unless': 0.39; 'put': 0.40; 'to:addr:python.org': 0.40; 'your': 0.61; 'zip': 0.62
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Peter Otten <__peter__@web.de>
Subject Re: multiple namespaces within a single module?
Date Thu, 09 Feb 2012 20:33:27 +0100
Organization None
References <6f50fa3d-74e6-4682-b5d8-2634d418dd23@d15g2000yqg.googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding 7Bit
X-Gmane-NNTP-Posting-Host p5084adf6.dip.t-dialin.net
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.5606.1328816021.27778.python-list@python.org> (permalink)
Lines 15
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1328816021 news.xs4all.nl 6890 [2001:888:2000:d::a6]:42877
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:20099

Show key headers only | View raw


jkn wrote:

>     is it possible to have multiple namespaces within a single python
> module?

Unless you are abusing classes I don't think so.
 
> I have a small app which is in three or four .py files. For various
> reasons I would like to (perhaps optionally) combine these into one
> file. 

Rename your main script into __main__.py, put it into a zip file together 
with the other modules and run that.

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


Thread

multiple namespaces within a single module? jkn <jkn_gg@nicorp.f9.co.uk> - 2012-02-09 10:32 -0800
  Re: multiple namespaces within a single module? Peter Otten <__peter__@web.de> - 2012-02-09 20:33 +0100
    Re: multiple namespaces within a single module? jkn <jkn_gg@nicorp.f9.co.uk> - 2012-02-09 15:24 -0800
      Re: multiple namespaces within a single module? Peter Otten <__peter__@web.de> - 2012-02-10 12:10 +0100
        Re: multiple namespaces within a single module? jkn <jkn_gg@nicorp.f9.co.uk> - 2012-02-10 08:28 -0800
  Re: multiple namespaces within a single module? Ethan Furman <ethan@stoneleaf.us> - 2012-02-09 13:12 -0800
  Re: multiple namespaces within a single module? Peter Otten <__peter__@web.de> - 2012-02-09 22:53 +0100
  Re: multiple namespaces within a single module? Ethan Furman <ethan@stoneleaf.us> - 2012-02-09 14:25 -0800
  Re: multiple namespaces within a single module? Ethan Furman <ethan@stoneleaf.us> - 2012-02-09 16:05 -0800
  Re: multiple namespaces within a single module? Arnaud Delobelle <arnodel@gmail.com> - 2012-02-10 10:41 +0000

csiph-web