vbuterin / pybitcointools

SImple, common-sense Bitcoin-themed Python ECC library
1.28k stars 856 forks source link

from: can't read /var/mail/bitcoin #158

Open vstoykovbg opened 7 years ago

vstoykovbg commented 7 years ago

Why it attempts to read /var/mail/bitcoin? There is no such reading request in the source, I searched and did not found it.

$ ./test.py 
from: can't read /var/mail/bitcoin
./test.py: line 10: syntax error near unexpected token `('
./test.py: line 10: `class TestECCArithmetic(unittest.TestCase):'
Terr commented 7 years ago

test.py doesn't have a shebang on the first line of the script. That causes bash to execute it as a normal shell script because it doesn't know it's should be interpreted by Python. The message you see is from the command line utility from that is executed because this line in test.py: from bitcoin import *

Putting #!/usr/bin/env python or similar at the top of the script would make bash call Python to execute the script.