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


Groups > comp.lang.python > #49578

PYTHONPATH and module names

Date 2013-07-01 11:29 -0700
From Tobiah <tshepard@rcsreg.com>
Subject PYTHONPATH and module names
Newsgroups comp.lang.python
Message-ID <mailman.4074.1372703671.3114.python-list@python.org> (permalink)

Show all headers | View raw


So today, I created a file called 'formatter.py',
and my program broke.  It turned out that I was
also import 'gluon' from web2py, which in turn,
somewhere, imported the regular python formatter.py
with which I was not familiar.

So the question is: Does one simply always have
to be knowledgeable about existing python library
names, or is having '.' in the python path just
a bad idea?  Is there a way, not having '.' in
the path to explicitly specify the current directory?
Something analogous to import ./foo ?

Thanks,

Tobiah

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


Thread

PYTHONPATH and module names Tobiah <tshepard@rcsreg.com> - 2013-07-01 11:29 -0700
  Re: PYTHONPATH and module names rusi <rustompmody@gmail.com> - 2013-07-01 11:39 -0700
    Re: PYTHONPATH and module names Tobiah <toby@tobiah.org> - 2013-07-01 12:54 -0700
      Re: PYTHONPATH and module names rusi <rustompmody@gmail.com> - 2013-07-01 14:38 -0700
        Re: PYTHONPATH and module names Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-07-01 22:05 +0000
          Re: PYTHONPATH and module names Lele Gaifax <lele@metapensiero.it> - 2013-07-02 07:30 +0200
      Re: PYTHONPATH and module names Fábio Santos <fabiosantosart@gmail.com> - 2013-07-01 23:08 +0100
      Re: PYTHONPATH and module names "SpaghettiToastBook ." <spaghettitoastbook@gmail.com> - 2013-07-01 16:40 -0400

csiph-web