Convert PySerial to python 3.0
Steve Holden
steve at holdenweb.com
Tue Feb 24 23:00:56 EST 2009
Seth wrote:
> I am just messing around trying to get pyserial to work with 3.0.
>
> I am stuck on this line:
>
> if type(port) in [type(''), type(u'')]
>
>
> how can I convert this to 3.0? I tried changing the u to a d that did
> not do anything.
>
How about
if type(port) in (str, bytes):
Untested.
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/
More information about the Python-list
mailing list