Ales Zemene wrote:
> hi, suprising for me is that making .py file:
> import md5
> hash = md5.new()
> and running it produces :
> AttributeError: 'module' object has no attribute 'new'

By any chance is your program called md5.py? If so it is being imported instead 
of the md5 
library module.

> 
> and similar : 
> from Crypto.Hash import MD5
> ImportError: cannot import name MD5
> 
> but in both cases it works on python command line intepretter.

Are you sure you are using the same interpreter in both cases? Maybe try
import sys
print sys.path

to make sure the directory containing Crypto.Hash is in sys.path...

HTH
Kent

> 
> Ales


_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to