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


Groups > comp.lang.python > #70389

Re: module and namespace

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <egon@frerich.eu>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.008
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'interpreter': 0.05; 'received:192.168.178': 0.07; 'session.': 0.07; 'subject:module': 0.09; 'python': 0.11; '__init__.py': 0.16; 'dark.': 0.16; 'happened?': 0.16; 'relevant.': 0.16; 'reproduce': 0.16; 'shooting': 0.16; 'statement.': 0.16; 'wrote:': 0.18; 'ownership': 0.19; 'import': 0.22; 'print': 0.22; 'header:User-Agent:1': 0.23; 'text.': 0.24; 'header:Received:8': 0.24; 'script': 0.25; 'post': 0.26; 'header:In-Reply-To:1': 0.27; 'to:2**1': 0.27; 'function': 0.29; 'am,': 0.29; 'gives': 0.31; 'lines': 0.31; 'text': 0.33; 'linux': 0.33; 'running': 0.33; "can't": 0.35; 'but': 0.35; 'wrong': 0.37; 'list.': 0.37; 'to:addr:python-list': 0.38; 'does': 0.39; 'delete': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.39; 'ensure': 0.60; 'more': 0.64; 'to:addr:gmail.com': 0.65; 'reply': 0.66; 'received:info': 0.72; '2014,': 0.84; 'otten': 0.84
X-Virus-Scanned by goneo
X-Spam-Flag NO
X-Spam-Score -2.56
X-Spam-Level
X-Spam-Status No, score=-2.56 tagged_above=-999 tests=[ALL_TRUSTED=-1, AWL=0.340, BAYES_00=-1.9] autolearn=ham
X-Virus-Scanned Debian amavisd-new at freudenberg.ih
Date Sat, 19 Apr 2014 16:55:54 +0200
From Egon Frerich <egon@frerich.eu>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0
MIME-Version 1.0
To bob gailer <bgailer@gmail.com>, Python-Liste <python-list@python.org>
Subject Re: module and namespace
References <534E5DA2.7050205@frerich.eu> <53526D28.908@gmail.com>
In-Reply-To <53526D28.908@gmail.com>
X-Enigmail-Version 1.5.2
Content-Type multipart/signed; protocol="application/pkcs7-signature"; micalg=sha1; boundary="------------ms070406070303060104000903"
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://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 <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.9363.1397919375.18130.python-list@python.org> (permalink)
Lines 100
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1397919375 news.xs4all.nl 2879 [2001:888:2000:d::a6]:33588
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:70389

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

Am 19.04.2014 14:33, schrieb bob gailer:
> On 4/16/2014 6:38 AM, Egon Frerich wrote:
>> If I use the interpreter I get:
>>
>> Python 3.3.5 (default, Apr 12 2014, 23:34:20)
>> [GCC 4.6.3] on linux
>> Type "help", "copyright", "credits" or "license" for more information.
>> import mptt
>> print(mptt)
>> <module 'mptt' from './mptt/__init__.py'>
>>
>>
>> But if I import mptt in my program the print-statement gives
>>
>> <module 'mptt' (namespace)>
>>
>> What is the meaning? When does this happened?
> I can't reproduce that behavior. Running a script with just those 2
> lines in gives me the same result as running in the interactive session.
> 
> Please post the program. Otherwise we are shooting in the dark.
> 
> Also note print is a function not a statement.
> 
> Be sure to:
> -  Place your answers following the relevant text.
> -  Delete old text that is no longer relevant.
> -  Ensure a copy of your reply goes to the list.
> 


Bob,

Peter Otten gave the hint. The __init__.py in the parent dictionary have
got the wrong ownership so it was not accessible.

Egon


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


Thread

Re: module and namespace Egon Frerich <egon@frerich.eu> - 2014-04-19 16:55 +0200

csiph-web