Please correct this python script to send data on USB0 port?
#!/usr/bin/env python
from serial import Serial
from time import sleep
class Create:
def __init__(self, tty="/dev/ttyUSB0"):
self.timeout = 5
self.port = Serial(tty, 57600, timeout= self.timeout)
def start(self):
self.__sendNow(P,0,0,0)
sleep(1)
self.__sendNow(V,0,0,100)
sleep(10)
def stop(self):
self.__sendNow(V,0,0,0)
/home/admin-pc/mywork/test/scripts/create.py: line 1: This module provides a class wrapping an Exia.: command not found
from: can't read /var/mail/serial
from: can't read /var/mail/time
/home/admin-pc/mywork/test/scripts/create.py: line 6: class: command not found
/home/admin-pc/mywork/test/scripts/create.py: line 7: Wrapper class for the iRobot Create: command not found
/home/admin-pc/mywork/test/scripts/create.py: line 9: syntax error near unexpected token ('/home/admin-pc/mywork/test/scripts/create.py: line 9:
def __init__(self, tty="/dev/ttyUSB0"):'