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

References <53ba52e1$0$2926$c3e8da3$76491128@news.astraweb.com> <53ba60dc$0$2926$c3e8da3$76491128@news.astraweb.com>
Date 2014-07-07 19:03 +1000
Subject Re: Module name does not match file name
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.11580.1404723816.18130.python-list@python.org> (permalink)

Show all headers | 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