Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder7.xlned.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.033 X-Spam-Evidence: '*H*': 0.93; '*S*': 0.00; '%s"': 0.09; '22,': 0.09; 'kumar': 0.09; 'python': 0.11; 'windows': 0.15; '(2,': 0.16; '55,': 0.16; 'msg)': 0.16; 'numbering': 0.16; 'port:': 0.16; 'xppython': 0.16; 'zero.': 0.16; 'wrote:': 0.18; 'trying': 0.19; 'advance.': 0.19; 'passing': 0.19; 'subject:Issue': 0.19; 'starts': 0.20; 'import': 0.22; 'shell': 0.22; 'error': 0.23; 'cc:2**0': 0.24; 'skip:" 40': 0.26; 'header:In-Reply-To:1': 0.27; 'tried': 0.27; 'am,': 0.29; 'raise': 0.29; "i'm": 0.30; 'url:mailman': 0.30; 'code': 0.31; "skip:' 10": 0.31; 'noted': 0.31; 'file': 0.32; 'open': 0.33; 'says': 0.33; 'url:python': 0.33; 'device': 0.34; 'could': 0.34; "can't": 0.35; 'test': 0.35; 'url:listinfo': 0.36; 'thanks': 0.36; 'hi,': 0.36; 'url:org': 0.36; 'wrong': 0.37; 'operating': 0.37; 'list.': 0.37; 'received:10': 0.37; 'manager': 0.38; 'to:addr:python-list': 0.38; 'anything': 0.39; 'to:addr:python.org': 0.39; 'url:mail': 0.40; 'even': 0.60; 'commands': 0.60; 'new': 0.61; 'you.': 0.62; 'header :Message-Id:1': 0.63; 'serial': 0.72; 'phil': 0.84; 'received:10.100': 0.84; '2013,': 0.91; 'subject:Port': 0.91; 'subject:Serial': 0.91; 'system:': 0.91 X-Virus-Scanned: Debian amavisd-new at petrasoft.net Subject: Re: Serial Port Issue Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: multipart/alternative; boundary="Apple-Mail=_5199FDAF-3F06-49DE-80B4-C1405AB737F4" From: Phil Birkelbach In-Reply-To: <1366623248.70365.YahooMailClassic@web190503.mail.sg3.yahoo.com> Date: Mon, 22 Apr 2013 10:13:44 -0500 References: <1366623248.70365.YahooMailClassic@web190503.mail.sg3.yahoo.com> To: python-list@python.org X-Mailer: Apple Mail (2.1283) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 107 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1366644089 news.xs4all.nl 2265 [2001:888:2000:d::a6]:52256 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:44088 --Apple-Mail=_5199FDAF-3F06-49DE-80B4-C1405AB737F4 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 Have you tried 'port=3D20'? The documentation says that the port numbering starts at zero. I don't = use Windows so I can't test it for you. You could also try port=3D"COM21" Phil On Apr 22, 2013, at 4:34 AM, chandan kumar wrote: > Hi, >=20 > I'm new to python and trying to learn serial communication using = python.In this process i'm facing serial port issues.Please find the = attached COMPorttest.py file ,correct me if anything wrong in the = code.With my code it's always goes in to exception.I noted down the the = COM port number from windows device manager list.=20 >=20 > Operating system: XP > Python Ver: 2.5 > Pyserial: 2.5 >=20 > Even i tried from python shell passing below commands >=20 > import serial > ser=3Dser=3Dserial.Serial(port=3D21,baudrate=3D9600) >=20 > I observe below error on python shell >=20 > File "C:\Python25\lib\serial\serialwin32.py", line 55, in open > raise SerialException("could not open port: %s" % msg) > SerialException: could not open port: (2, 'CreateFile', 'The system = cannot find the file specified.') >=20 > Thanks in advance. >=20 > Best Regards, > Chandan. >=20 >=20 >=20 > --=20 > http://mail.python.org/mailman/listinfo/python-list --Apple-Mail=_5199FDAF-3F06-49DE-80B4-C1405AB737F4 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=iso-8859-1 Have = you tried 'port=3D20'?

The documentation says that = the port numbering starts at zero.  I don't use Windows so I can't = test it for you.

You could also try = port=3D"COM21"

Phil

On Apr 22, 2013, at 4:34 AM, chandan kumar wrote:

Hi,

I'm new to python = and trying to learn serial communication using python.In this process = i'm facing serial port issues.Please find the attached = COMPorttest.py file ,correct me if anything wrong in the code.With my = code it's always goes in to exception.I noted down the the COM port = number  from windows device manager = list. 

Operating system: XP
Python Ver: 2.5
Pyserial: 2.5

Even i = tried from python shell passing below commands

import = serial
ser=3Dser=3Dserial.Serial(port=3D21,baudrate=3D9600)

I observe below error on python = shell

File "C:\Python25\lib\serial\serialwin32.py", line = 55, in open
    raise SerialException("could not = open port: %s" % msg)
SerialException: could not open port: = (2, 'CreateFile', 'The system cannot find the file = specified.')

Thanks = in advance.

Best = Regards,
Chandan.



<COMPortTest.py><DeviceManager.PNG>--
http://mail.p= ython.org/mailman/listinfo/python-list

= --Apple-Mail=_5199FDAF-3F06-49DE-80B4-C1405AB737F4--