[Tutor] But Serially, Folks...
Curtis Larsen
curtis.larsen@Covance.Com
Mon, 16 Oct 2000 14:49:34 -0500
Probably a silly question, but since I haven't seen it mentioned in any
of the Python books thus far (Authors: Read 'opportunity' here), and
also bearing in mind that I'm no Linux expert -- not even close -- I
will just ask:
I'd like to use Python to do some work over a serial port (/dev/ttyS1,
to be precise) but the datacomm I'm attempting must set to a particular
baud rate, parity, stop-bits, yadda-yadda. So -- how does one do this
in Python and ensure that it is so, then put it back the way you found
it?
Do I call "setserial" before/after I run my module, or some such?
(Does Python even have a way of doing this "natively"?)
Also - since my datacomm will be *very* async (spew-wait-listen-spew),
can someone recommend an existing module for me to use or work from?
Perhaps someone already has something similar sitting around?
Thanks!
Curtis
-----------------------------------------------------
Confidentiality Notice: This e-mail transmission
may contain confidential or legally privileged
information that is intended only for the individual
or entity named in the e-mail address. If you are not
the intended recipient, you are hereby notified that
any disclosure, copying, distribution, or reliance
upon the contents of this e-mail is strictly prohibited.
If you have received this e-mail transmission in error,
please reply to the sender, so that we can arrange
for proper delivery, and then please delete the message
from your inbox. Thank you.
begin 644 TEXT.htm
M/"%$3T-465!%($A434P@4%5"3$E#("(M+R]7,T,O+T141"!(5$U,(#0N,"!4
M<F%N<VET:6]N86PO+T5.(CX-"CQ(5$U,/CQ(14%$/@T*/$U%5$$@8V]N=&5N
M=#TB=&5X="]H=&UL.R!C:&%R<V5T/6ES;RTX.#4Y+3$B(&AT='`M97%U:78]
M0V]N=&5N="U4>7!E/@T*/$U%5$$@8V]N=&5N=#TB35-(5$U,(#4N,#`N,CDQ
M.2XV,S`W(B!N86UE/4=%3D52051/4CX\+TA%040^#0H\0D]$62!B9T-O;&]R
M/2-F9F9F9F8@#0IS='EL93TB1D].5#H@,3!P="!!<FEA;#L@34%21TE.+4Q%
M1E0Z(#)P>#L@34%21TE.+51/4#H@,G!X(CX-"CQ$258^4')O8F%B;'D@82!S
M:6QL>2!Q=65S=&EO;BP@8G5T('-I;F-E($D@:&%V96XG="!S965N(&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