Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!solaris.cc.vt.edu!news.vt.edu!newsfeed-00.mathworks.com!panix!not-for-mail From: Grant Edwards Newsgroups: comp.lang.python,microsoft.public.windowsxp.general Subject: Re: PySerial could not open port COM4: [Error 5] Access is denied - please help Date: Wed, 27 Jun 2012 21:18:09 +0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Lines: 18 Message-ID: References: NNTP-Posting-Host: dsl.comtrol.com X-Trace: reader1.panix.com 1340831889 11621 64.122.56.22 (27 Jun 2012 21:18:09 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: Wed, 27 Jun 2012 21:18:09 +0000 (UTC) User-Agent: slrn/pre1.0.0-18 (Linux) Xref: csiph.com comp.lang.python:24543 On 2012-06-27, Adam wrote: > The Python script needed a call to ser.close() before ser.open() in > order to work. IOW, the port opened OK, but when you tried to open it a second time without closing it first, _that's_ when the .open() call failed. That's a restriction built in to Win32. You can't open a serial port that's already open. [Linux doesn't have that restriction.] Why do you need to open it a second time? -- Grant Edwards grant.b.edwards Yow! Send your questions to at ``ASK ZIPPY'', Box 40474, gmail.com San Francisco, CA 94140, USA