newbie to python

Johhny exter_c at hotmail.com
Fri Dec 16 04:33:23 EST 2005


Hello,

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 ?
TypeError: 'module' object is not callable




More information about the Python-list mailing list