[IPython-user] Error when importing module into ipython

John Pye john.pye@student.unsw.edu...
Mon Apr 2 04:50:05 CDT 2007


Hi all

I have a python module that I've developed. It's C++ code wrapped with
SWIG to provide steam properties for use in engineering calculations.

But I've just noticed that it won't import correctly under IPython 0.7.3
on Python 2.4.2 on Windows XP. I get an error message like shown below. 

The funny thing is that I can import the package fine under the standard 
vanilla python console, and there are no errors (even when I run type
'S = freesteam.steam_pT(); del S', which the following would suggest 
could have failed). And it imports fine under IPython 0.7.2 on Linux 
as well.

Any suggestions on what I could be doing wrong here?

Cheers
JP

http://freesteam.sourceforge.net/

In [1]: from freesteam import *
---------------------------------------------------------------------------
exceptions.AttributeError                            Traceback (most
recent call
 last)

C:\Documents and Settings\john\<ipython console>

C:\Python24\lib\site-packages\freesteam.py
    135 steam_ps_swigregister(steam_ps)
    136
--> 137 class steam_pT(_object):
    138     __swig_setmethods__ = {}
    139     __setattr__ = lambda self, name, value: _swig_setattr(self,
steam_pT
, name, value)

C:\Python24\lib\site-packages\freesteam.py in steam_pT()
    145         try: self.this.append(this)
    146         except: self.this = this
--> 147     __swig_destroy__ = _freesteam.delete_steam_pT
    148     __del__ = lambda self : None;
    149     def solve(*args): return _freesteam.steam_pT_solve(*args)

AttributeError: 'module' object has no attribute 'delete_steam_pT'

In [2]:




-- 
John Pye
Department of Mechanical and Manufacturing Engineering
University of New South Wales, Sydney, Australia
http://pye.dyndns.org/



More information about the IPython-user mailing list