Strange Python Module issue, just on a mac
Question: I have psutil installed, I can import it fine and use it to pull information,
if I show all the modules, I can see it is installed. However if I run the
code below

    
    
    try: 
      imp.find_module('psutil')
      pass
    except ImportError:
      print 'This program needs psutil to work, as this is not installed the script will now exit'
      sys.exit()`
    

It says it's not installed. I have this bit of code in a script and it works,
on Windows, Solaris, Linux just not my Mac.

Any help is appreciated


Answer: I have now resolved the issue. It's very strange, as I mentioned if I load
python from the terminal, it loads the module and I can use it. I can also see
it if I see all the modules installed.

I done a search on the drive and I found
psutil-1.0.1-py2.7-macosx-10.7-intel.egg, I have created a softlink to the
file

    
    
    cd /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
    sudo ln -s /Library/Python/2.7/site-packages/psutil-1.0.1-py2.7-macosx-10.7-intel.egg psutil.py
    

Once this was done, everything is working fine, I can still call it
interactively but now the above snippet of code works

Thanks to everyone's help

