import module unbelieveable behaviour

Diez B. Roggisch deets at
Wed Jul 15 17:41:54 CEST 2009

Peter Fodrek wrote:

> Dear conference!
> I have test Why python based script for HeeksCNC post-processing does not
> work...  And I've got unbelievable behavior  When importing module module
> manually it works, but same opertaion from script does not
>  work as seen
> /opt/HeeksCAD8/HeeksCNC> python
> 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.rez
> /opt/HeeksCAD8/HeeksCNC> python
> Traceback (most recent call last):
>   File "", line 7, in <module>
>     import nc.rez
> ImportError: No module named rez

What does 

import nc
print nc.__file__

tell you, and is that what you'd expect it to be?


More information about the Python-list mailing list