Johhny wrote:

> Here is the script then the problem.
> 
> cat testing.py
> 
> import crypt
> import random, string
> def getsalt(chars = string.letters + string.digits):
>      return random.choice(chars) + random.choice(chars)
> username = raw_input('password : ')
> print crypt.crypt(username,getsalt())
> 
> 
> python testing.py
> password : testing
> Traceback (most recent call last):
>   File "testing.py", line 1, in ?
>     import crypt
>   File "/home/testing/scripts/crypt.py", line 4, in ?

Read carefully. You have a file /home/testing/scripts/crypt.py which is
imported instead of the crypt module in Python's standard library.
Rename /home/testing/scripts/crypt.py to something else, delete
/home/testing/scripts/crypt.pyc, and all should be well.

Peter


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to