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


Groups > comp.lang.python > #70389 > unrolled thread

Re: module and namespace

Started byEgon Frerich <egon@frerich.eu>
First post2014-04-19 16:55 +0200
Last post2014-04-19 16:55 +0200
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

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

#70389 — Re: module and namespace

FromEgon Frerich <egon@frerich.eu>
Date2014-04-19 16:55 +0200
SubjectRe: module and namespace
Message-ID<mailman.9363.1397919375.18130.python-list@python.org>

[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


[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web