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


Groups > comp.lang.python > #74087

Re: Module name does not match file name

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!lightspeed!lightspeed.eweka.nl!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.002
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'subject:not': 0.03; 'output': 0.05; 'startup': 0.05; 'subject:file': 0.07; 'imported': 0.09; 'cc:addr:python-list': 0.11; 'creates': 0.14; '"python': 0.16; '"run': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'wrote:': 0.18; 'module': 0.19; 'import': 0.22; 'cc:addr:python.org': 0.22; 'mon,': 0.24; 'cc:2**0': 0.24; 'gets': 0.27; 'header:In-Reply-To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; "d'aprano": 0.31; 'steven': 0.31; 'file': 0.32; "i'd": 0.34; 'received:google.com': 0.35; 'there': 0.35; 'so,': 0.37; 'pm,': 0.38; 'either': 0.39; 'called': 0.40; 'how': 0.40; 'fact,': 0.69; 'jul': 0.74; 'to:none': 0.92
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=vdSmgIvFZJC/e/+KDuMVYmYZzXnEbFX92jI9L4UCMXk=; b=Uwm173lqli3QxCl3JzdyEesGA1zVA8P41bePLje9Wjxtj+kYBLoqfHNF2yoB6CNay8 DQPa8ltY31CYrYPJ7mUmI+zeW3o8azzWM6ApdHvFD3lmRbfB4KOoSU4h/Rc4x8WzBHSK qaAjvHZ15w8ouggzw9sMlLdmyltksEjv+cAxSwi1qcfGPH4bczxZCscU1hYmqwTrOtg/ qEjtVLPGW+ZohOe/0G3/0NygysrWjGL/y7n3siSY3AMVI+hAnqw7XDEUKmLhr5jzeTt/ iL93GTuPnjQlsGqsDdcLRhuyYTUyxrcnAW+N7jXe/7qGpfuaXrc6BbYohtgzfjeTF1Ea rffQ==
MIME-Version 1.0
X-Received by 10.220.92.193 with SMTP id s1mr11667304vcm.34.1404723813242; Mon, 07 Jul 2014 02:03:33 -0700 (PDT)
In-Reply-To <53ba60dc$0$2926$c3e8da3$76491128@news.astraweb.com>
References <53ba52e1$0$2926$c3e8da3$76491128@news.astraweb.com> <53ba60dc$0$2926$c3e8da3$76491128@news.astraweb.com>
Date Mon, 7 Jul 2014 19:03:33 +1000
Subject Re: Module name does not match file name
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
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.11580.1404723816.18130.python-list@python.org> (permalink)
Lines 10
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1404723816 news.xs4all.nl 2893 [2001:888:2000:d::a6]:57546
X-Complaints-To abuse@xs4all.nl
X-Received-Bytes 3451
X-Received-Body-CRC 2453498495
Xref csiph.com comp.lang.python:74087

Show key headers only | View raw


On Mon, Jul 7, 2014 at 6:57 PM, Steven D'Aprano <steve@pearwood.info> wrote:
> which suggests that the pgmodule.so file creates a module called "pg".
> What I don't understand is how "import pg" gets turned into "run
> pgmodule.so"?

What happens if you *don't* import pg? Is there a sys.modules["pg"]
already? If so, I'd go looking at what gets imported on startup - in
fact, either way, "python -v" output might be of value here.

ChrisA

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


Thread

Module name does not match file name Steven D'Aprano <steve@pearwood.info> - 2014-07-07 07:57 +0000
  Re: Module name does not match file name Chris Angelico <rosuav@gmail.com> - 2014-07-07 18:04 +1000
    Re: Module name does not match file name Steven D'Aprano <steve@pearwood.info> - 2014-07-07 09:03 +0000
      Re: Module name does not match file name Chris Angelico <rosuav@gmail.com> - 2014-07-07 19:11 +1000
  Re: Module name does not match file name Steven D'Aprano <steve@pearwood.info> - 2014-07-07 08:57 +0000
    Re: Module name does not match file name Chris Angelico <rosuav@gmail.com> - 2014-07-07 19:03 +1000
      Re: Module name does not match file name Steven D'Aprano <steve@pearwood.info> - 2014-07-07 09:28 +0000
    Re: Module name does not match file name Peter Otten <__peter__@web.de> - 2014-07-07 12:41 +0200
    Re: Module name does not match file name Robert Kern <robert.kern@gmail.com> - 2014-07-07 12:15 +0100
      Re: Module name does not match file name Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-07-07 11:56 +0000
        Re: Module name does not match file name Chris Angelico <rosuav@gmail.com> - 2014-07-07 22:04 +1000
        Re: Module name does not match file name Robert Kern <robert.kern@gmail.com> - 2014-07-07 15:25 +0100

csiph-web