If I type on the python console these three lines:
>> import serial
>> s = serial.Serial('/dev/tty.usbmodemFD121', 9600)
>> s.write('00001§1\r')
Everything works perfectly! But if i put these three lines inside a script so:
# -*- coding: utf-8 -*-
import serial
s = serial.Serial('/dev/tty.usbmodemFD121', 9600)
s.write('00001§1\r')
And I run it from the bash:
/Users/francesco/sender.py
Doesn't work! How is possible? Someone can help me?