From: John P. <joh...@st...> - 2007-04-04 01:05:11
|
Josh Cherry wrote: > > > On Tue, 3 Apr 2007, John Pye wrote: > >> I have a SWIG module fails to import on in IPython on Python 2.4.2 on >> Windows XP. But it works fine on Linux, and also works fine on Windows >> with the plain vanilla Python console. >> >> The funny thing is that the import error that IPython shows is different >> depending on the version of SWIG that I use to build my module. >> >> With SWIG 1.3.24, I get an error (see below) "'module' object has no >> attribute 'delete_exception'". But with SWIG 1.3.28 and 1.3.31 I get an >> error "'module' object has no attribute 'delete_steam_pT'". I am using >> MinGW GCC 3.4.5, but I have also tried with GCC 3.4.2 to no avail. > > It may just be a matter of which missing attribute is referenced first > in the .py file, rather than a difference in what is missing. > > I would recommend import'ing the low-level module, _freasteam, in > IPython and examining it. Is it coming from the file that you expect > (perhaps it's loading a different version of the dll that you have > somewhere in its search path)? What attributes *does* it have, etc.? > > Josh Thanks for the suggestion. Indeed there was a stray _freesteam.dll in my system that I hadn't spotted. For the record: import _freesteam print _freesteam.__file__ Strangely, IPython was finding the different copy in my c:\Python24\scripts directory, but vanilla python was not. Cheers JP -- John Pye Department of Mechanical and Manufacturing Engineering University of New South Wales, Sydney, Australia http://pye.dyndns.org/ |