[omniORB] Compiling omniORBpy for omniORB4: _omniidl.__file__ attribute

Harri Pasanen harri.pasanen@trema.com
Thu, 28 Mar 2002 12:36:05 +0100 (CET)


I don't understand why there is the following code in omniidl/main.py:

if hasattr(_omniidl, "__file__"):
    preprocessor_path = os.path.dirname(_omniidl.__file__)
else:
    preprocessor_path = os.path.dirname(sys.argv[0])


For me, on Mandrake 8.2, with Python 2.2, the __file__ attribute exists,
and is:

/work/harri/omni4/lib/python2.2/site-packages/_omniidlmodule.so

This looks perfectly fine, but I don't see why it would expect to find
omnicpp in the same directory?   By setting:

preprocessor_path = os.path.dirname(sys.argv[0]) 

it seems to work fine.

This is with latest omnipy2_develop and omniORB4 from CVS.


-Harri