Search found 3 matches
- Fri Mar 17, 2023 9:45 am
- Forum: Linux
- Topic: Styr din tellstick med python
- Replies: 17
- Views: 18214
Styr din tellstick med python
Här kommer ett litet pythonscript för att styra tellsticken. import sys, termios, time class Tellstick: def __init__(self, device): self.fd = open(device, 'w') self.reciver = {} new = termios.tcgetattr(self.fd) cflag = termios.B4800 | termios.CS8 | termios.CLOCAL | termios.CREAD iflag = termios.IGNP...
- Fri Mar 17, 2023 9:45 am
- Forum: Linux
- Topic: Styr din tellstick med python
- Replies: 17
- Views: 18214
- Fri Mar 17, 2023 9:45 am
- Forum: Linux
- Topic: Styr din tellstick med python
- Replies: 17
- Views: 18214
Finns det några speciella fördelar med erat API? Föredrar att använda ren python istället för att länka in C.
angående plattformsoberoende:
typ
angående plattformsoberoende:
Code: Select all
try:
import termios
except Importerror:
#setup fd for windows here
else:
#termios..... linux here.