import module unbelieveable behaviour
pavlovevidence at gmail.com
Thu Jul 16 01:38:23 EDT 2009
On Jul 15, 10:16 pm, Peter Fodrek <peter.fod... at stuba.sk> wrote:
> On Wednesday 15 July 2009 17:41:54 Diez B. Roggisch wrote:
> > Peter Fodrek wrote:
> > What does
> > import nc
> > print nc.__file__
> Python 2.6 (r26:66714, Feb 3 2009, 20:49:49)
> [GCC 4.3.2 [gcc-4_3-branch revision 141291]] on linux2
> Type "help", "copyright", "credits" or "license" for more information.>>> import nc
> >>> print nc.__file__
What does it do if you run this from a script?
Also, what is sys.path in both interactive and script?
Inside test.py, right before the line that imports nc.rez, add the
code "import sys; print sys.modules.get('nc')"; what does that output?
Is there an old nc.py or nc.pyc file anywhere?
More information about the Python-list