Modifying .htpasswd from Python?

Gustaf Liljegren gustafl at algonet.se
Mon Jan 22 03:44:40 EST 2001


michael at stroeder.com (Michael Ströder) wrote: 

>Gustaf Liljegren wrote:
>> 
>> This can be done easily in Perl, using the crypt() function. Now I
>> need a Python function doing exactly the same encryption as the
>> htpasswd command. 
>
>See module crypt.

I saw it, but couldn't import it, and by the docs it seems to be only 
decrypting.

Python 1.5.1 (#1, Jan  7 1999, 12:00:35) [C] on sunos5
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import crypt
Traceback (innermost last):
  File "<stdin>", line 1, in ?
ImportError: No module named crypt
>>>




More information about the Python-list mailing list