delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/11/18/15:51:03

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
content-class: urn:content-classes:message
MIME-Version: 1.0
X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0
Subject: RE: [ANNOUNCEMENT] Updated Cygwin Package: python-2.2.2-1
Date: Mon, 18 Nov 2002 15:49:32 -0500
Message-ID: <83040F98B407E6428FEC18AC720F5D732DB74B@exchange.tropicnetworks.com>
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
From: "Rolf Campbell" <rcampbell AT tropicnetworks DOT com>
To: "Jason Tishler" <jason AT tishler DOT net>, <cygwin AT cygwin DOT com>
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id gAIKp2e05412

Thanks Jason,

The problem was actually a combination of some strange code in the
pyserial package, and the termios.TIOCMGET attribute being added in
python 2.2.2.

Python 2.2.1 (#1, Jun 25 2002, 10:55:46) 
[GCC 2.95.3-5 (cygwin special)] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import termios
>>> hasattr(termios, 'TIOCMGET')
0


Python 2.2.2 (#1, Nov 15 2002, 07:49:04) 
[GCC 2.95.3-5 (cygwin special)] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import termios
>>> hasattr(termios, 'TIOCMGET')
1

The pyserial code was assuming if TIOCMGET was defined, then a bunch of
other things would be too (which was a bad assumption).  I have patched
pyserial (locally) and it seems to work fine now.  Thanks for your quick
response.

-Rolf

> -----Original Message-----
> From: Jason Tishler [mailto:jason AT tishler DOT net] 
> Sent: Monday, November 18, 2002 3:24 PM
> To: cygwin AT cygwin DOT com
> Subject: Re: [ANNOUNCEMENT] Updated Cygwin Package: python-2.2.2-1
> 
> 
> Rolf,
> 
> On Mon, Nov 18, 2002 at 01:23:13PM -0500, Rolf Campbell wrote:
> > I tried going back to python-2.2.1-1, and everything 
> started working 
> > again.
> 
> Really?  I just tried the following:
> 
> 
>     $ ./python
>     Python 2.2.1 (#1, Jun 25 2002, 10:55:46) 
>            ^^^^^
>            *****
>     [GCC 2.95.3-5 (cygwin special)] on cygwin
>     Type "help", "copyright", "credits" or "license" for more 
> information.
>     >>> import TERMIOS
>     /home/jt/src/python-2.2.1-1/Lib/TERMIOS.py:7: 
> DeprecationWarning: the TERMIOS module is deprecated; please 
> use termios
>       DeprecationWarning)
>     >>> 
>     >>> TERMIOS.TIOCMBIS
>     Traceback (most recent call last):
>       File "<stdin>", line 1, in ?
>     AttributeError: 'module' object has no attribute 'TIOCMBIS'
> 
> So, python-2.2.1-1 does not seem to work either.  I also 
> tried 2.2-1 and 2.1.1-1 -- they don't seem to define 
> TERMIOS.TIOCMBIS either.
> 
> Upon reading Modules/termios.c, we see the following:
> 
>     #ifdef TIOCMBIC
>         {"TIOCMBIC", TIOCMBIC},
>     #endif
>     #ifdef TIOCMBIS
>         {"TIOCMBIS", TIOCMBIS},
>     #endif
> 
> Hence, TIOCMBI[CS] will only be defined if a header files (e.g.,
> sys/termios.h) defines the corresponding constants.
> 
> > I don't know if this is really a problem with the cygwin version of 
> > python or not.  The "TIOCMBI[SC]" attributes of the termios module 
> > seem to have disappeared.  I really don't know what these 
> are, or what 
> > they are used for, but if anyone knows what I can change 
> them to, to 
> > make it work, I'd be appreciative.
> 
> I'm sorry but if this is important to you, then you will have 
> to debug this corner case further yourself.  AFAICT, there 
> have not been any changes to Cygwin Python is this area for 
> sometime (i.e., for over 1 year).
> 
> Jason
> 
> -- 
> PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
> Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
> 
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting:         http://cygwin.com/bugs.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/
> 
> 

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019