durusmail: durus-users: Some errors on windows
Some errors on windows
2007-05-10
Some errors on windows
Sergio Álvarez
2007-05-10
There are some issues with durus on windows.


Error 1:

  File "c:\python25\Lib\site-packages\durus\file.py", line 5, in 
    import os, os.path, fcntl
ImportError: No module named fcntl


Solved with:

import os, os.path
from os.path import exists
from tempfile import NamedTemporaryFile, _TemporaryFileWrapper
if os.name == 'nt':
    import win32con, win32file, pywintypes # http://sf.net/projects/pywin32/
else:
    import fcntl


Error 2 (and too many errors):

  File "c:\python25\lib\site-packages\durus\storage_server.py", line
11, in 
    from grp import getgrnam, getgrgid
ImportError: No module named grp


Solved with:

import os
if os.name != 'nt':
    from grp import getgrnam, getgrgid
    from os import unlink, stat, chown, geteuid, getegid, umask, getpid
    from pwd import getpwnam, getpwuid


I compiled durus with:

python setup.py build --compiler=mingw32 install


Bye!

--
Sergio Álvarez Muñoz (xergio)
León-Madrid - Spain

email: mail@xergio.net
xmpp: xergio@jabberland.com
web: http://xergio.net
reply