Pregunta

My problem is the follow: I have installed pyCrypto in my computer. Then when I execute a script the intepreter say this:

from: can't read /var/mail/Crypto.Cipher
./entrega2.py: line 2: syntax error near unexpected token ('
./entrega2.py: line 2: obj=DES.new('abcdefgh', DES.MODE_ECB)'

It can't read from Crypto.Cipher. However if I execute the intepreter of python, then I can do this:

from Crypto.Cipher import AES

This sentence in the intepret runs but in a file not. I don't know why.

Sorry because my english is very bad and my skills low.

Can somebody help me? Thanks

¿Fue útil?

Solución

Make sure you execute the script as python entrega2.py

Or

Add the following at the top of the script:

#!/usr/bin/env python 
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top