Serial library for Python needed for some of the Tmote Sky tools
This commit is contained in:
parent
2c1af74f37
commit
d8717c264a
9 changed files with 965 additions and 0 deletions
21
tools/sky/serial/__init__.py
Normal file
21
tools/sky/serial/__init__.py
Normal file
|
@ -0,0 +1,21 @@
|
|||
#!/usr/bin/env python
|
||||
#portable serial port access with python
|
||||
#this is a wrapper module for different platform implementations
|
||||
#
|
||||
# (C)2001-2002 Chris Liechti <cliechti@gmx.net>
|
||||
# this is distributed under a free software license, see license.txt
|
||||
|
||||
import sys, os, string
|
||||
VERSION = string.split("$Revision: 1.1 $")[1] #extract CVS version
|
||||
|
||||
#chose an implementation, depending on os
|
||||
if os.name == 'nt': #sys.platform == 'win32':
|
||||
from serialwin32 import *
|
||||
elif os.name == 'posix':
|
||||
from serialposix import *
|
||||
elif os.name == 'java':
|
||||
from serialjava import *
|
||||
else:
|
||||
raise "Sorry no implementation for your platform available."
|
||||
|
||||
#no "mac" implementation. someone want's to write it? i have no access to a mac.
|
Loading…
Add table
Add a link
Reference in a new issue