[MMTK] nMoldyn and getuid

Peter mmtk at maubp.freeserve.co.uk
Sat May 20 15:02:29 CEST 2006


> So  I have checked pMoldyn and I am getting a new error,  
> 
>>>>import nMoldyn
>>>>import pMoldyn
> 
> Traceback (most recent call last):
>   File "<interactive input>", line 1, in ?
>   File "C:\Python23\Scripts\pMoldyn.py", line 3, in ?
>     from nMoldyn.core import *
>   File "c:\python23\Lib\site-packages\nMoldyn\core.py", line 20, in ?
>     from os import system,getuid
> ImportError: cannot import name getuid
> 
> Any help would be greatly appreciated
> 
> JAvier

A similar problem with nMoldyn using the pwd module discussed on the 
mailing list in March 2006.

Basically, os.getuid() is a Unix/Linux only function to return current 
process' user id.  It is not available on Windows:

http://docs.python.org/lib/os-procinfo.html

There is probably something in the win32api module that could be used 
instead, maybe win32api.GetCurrentProcess() - or maybe for Windows the 
PID isn't actually needed, I haven't looked at the code.

Peter




More information about the mmtk mailing list