Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!cs.uu.nl!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!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.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subsequent': 0.04; 'great.': 0.07; 'subject:skip:c 10': 0.07; 'buffer.': 0.09; 'handler,': 0.09; 'cc:addr:python-list': 0.10; 'dec': 0.15; '"n"': 0.16; 'received:mac.com': 0.16; 'rs232': 0.16; 'wrote:': 0.17; 'bytes': 0.17; 'received:10.0.1': 0.17; 'equivalent': 0.20; 'written': 0.20; 'meant': 0.21; 'explicit': 0.22; 'subject:problem': 0.22; 'seems': 0.23; 'cc:2**1': 0.24; 'specifically': 0.24; 'cc:addr:python.org': 0.25; 'am,': 0.27; "doesn't": 0.28; '"do': 0.29; 'jean': 0.29; 'python"': 0.29; 'url:mailman': 0.29; 'waste': 0.30; 'writes': 0.30; 'code': 0.31; '(and': 0.32; 'url:python': 0.32; 'could': 0.32; 'url:listinfo': 0.32; 'received:10.0': 0.33; 'problem': 0.33; 'another': 0.33; 'changed': 0.34; 'received:17': 0.35; 'there': 0.35; 'but': 0.36; 'url:org': 0.36; 'cc:no real name:2**1': 0.36; 'characters': 0.36; 'subject:with': 0.36; 'charset:us-ascii': 0.36; 'does': 0.37; 'rather': 0.37; 'subject:: ': 0.38; 'some': 0.38; 'things': 0.38; 'received:10': 0.38; 'where': 0.40; 'skip:" 10': 0.40; 'subject:-': 0.40; 'url:mail': 0.40; 'from:no real name:2**0': 0.60; 'skip:u 10': 0.60; 'serial': 0.66 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.9.8185,1.0.431,0.0.0000 definitions=2012-12-06_04:2012-12-06, 2012-12-06, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=6.0.2-1203120001 definitions=main-1212060093 Subject: Re: problem with usbtmc-communication From: wrw@mac.com In-reply-to: Date: Thu, 06 Dec 2012 09:50:10 -0500 References: <05927d41-f73f-4fef-9a6d-4133e5c7d86a@n8g2000vbb.googlegroups.com> <0910382a-08df-4325-806f-a4c3cdf6bd7b@f17g2000vbz.googlegroups.com> To: Jean Dubois X-Mailer: Apple Mail (2.1499) Cc: python-list@python.org, wrw@mac.com 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: 24 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1354805416 news.xs4all.nl 6923 [2001:888:2000:d::a6]:43927 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:34395 On Dec 6, 2012, at 8:50 AM, Jean Dubois wrote: [byte] > > It seems there is some misunderstanding here. What I meant with how > to "do the equivalent in Python" refered to "reading characters > rather than lines". > I have written working code myself for another Keithleu which does use > RS232 for communication. The problem now is specifically for the new > Keithley which doesn't allow RS232 but only USB-communication over > usbtmc. So if the "buffer-problem" could be changed by reading > characters that would be great. > > regards, > Jean > > > -- > http://mail.python.org/mailman/listinfo/python-list Sorry about the misunderstanding (and subsequent waste of bandwidth). However, if you will look at the serial reads and writes in that handler, you will see that it does things like "serial.read(n)" where "n" is an explicit number, the number of bytes to be read from the serial buffer. -Bill