REPOST: Re: values of sys.platform? for a serial port lib

Henrik Motakef henrik at moskau.hmotakef.homeip.net
Sat Dec 29 22:19:55 CET 2001


Chris Liechti <cliechti at gmx.net> writes:

> i'm interested in values for "sys.platform" and, if possible, the name of 
> the serial port (an how the ports are numbered ttyS0, ttyS1 etc.)
> e.g "linux2" and "/dev/ttyS%d" % port, numbering starting at zero.

I don't really know where sys.platform is defined (I ended up with a
"grep -r "PLATFORM" * in the source tree, resulting in a line
"Makefile.pre.in: $(CC) -c $(CFLAGS) -DPLATFORM='"$(MACHDEP)"'...", so I
think it's defined by autoconf/automake; maybe that helps...), but FYI:

# python -c "import sys; print sys.platform"
openbsd3
# ls /dev/tty*
/dev/tty     /dev/ttyC5   /dev/ttyc2   /dev/ttyp4   /dev/ttype   /dev/ttyq8
/dev/tty00   /dev/ttyC6   /dev/ttyc3   /dev/ttyp5   /dev/ttypf   /dev/ttyq9
/dev/tty01   /dev/ttyC7   /dev/ttyc4   /dev/ttyp6   /dev/ttyq0   /dev/ttyqa
/dev/tty02   /dev/ttyC8   /dev/ttyc5   /dev/ttyp7   /dev/ttyq1   /dev/ttyqb
/dev/tty03   /dev/ttyC9   /dev/ttyc6   /dev/ttyp8   /dev/ttyq2   /dev/ttyqc
/dev/ttyC0   /dev/ttyCa   /dev/ttyc7   /dev/ttyp9   /dev/ttyq3   /dev/ttyqd
/dev/ttyC1   /dev/ttyCb   /dev/ttyp0   /dev/ttypa   /dev/ttyq4   /dev/ttyqe
/dev/ttyC2   /dev/ttyCcfg /dev/ttyp1   /dev/ttypb   /dev/ttyq5   /dev/ttyqf
/dev/ttyC3   /dev/ttyc0   /dev/ttyp2   /dev/ttypc   /dev/ttyq6
/dev/ttyC4   /dev/ttyc1   /dev/ttyp3   /dev/ttypd   /dev/ttyq7
# w
 9:18PM  up 16:54, 5 users, load averages: 1.17, 1.24, 1.23
USER    TTY FROM              LOGIN@  IDLE WHAT
henrik   C0 -                 4:24AM     0 xemacs http.ml 
henrik   p2 :0.0              8:04PM  1:06 gimp devel/yeah/docs/request_process

hth
Henrik

========= WAS CANCELLED BY =======:
Path: news.sol.net!spool0-nwblwi.newsops.execpc.com!newsfeeds.sol.net!newspump.sol.net!newsfeed.direct.ca!look.ca!newsfeed.dacom.co.kr!feeder.kornet.net!news1.kornet.net!ua4canc3ll3r
From: Henrik Motakef <henrik at moskau.hmotakef.homeip.net>
Newsgroups: comp.lang.python
Subject: cmsg cancel <873d1tiv0k.fsf at moskau.hmotakef.homeip.net>
Control: cancel <873d1tiv0k.fsf at moskau.hmotakef.homeip.net>
Date: Mon, 31 Dec 2001 04:38:21 GMT
Organization: A poorly-installed InterNetNews site
Lines: 2
Message-ID: <cancel.873d1tiv0k.fsf at moskau.hmotakef.homeip.net>
NNTP-Posting-Host: 211.57.49.2
X-Trace: news2.kornet.net 1009774500 27193 211.57.49.2 (31 Dec 2001 04:55:00 GMT)
X-Complaints-To: usenet at news2.kornet.net
NNTP-Posting-Date: Mon, 31 Dec 2001 04:55:00 +0000 (UTC)
X-No-Archive: yes
X-Unac4ncel: yes
X-Commentary: I love NewsAgent 1.10 and the Sandblaster Cancel Engine Build 74 (19 March 1999)

This message was cancelled from within Mozilla.



More information about the Python-list mailing list