On Dec 11, 2012, at 3:48 PM, Jean Dubois <jeandubois...@gmail.com> wrote:
[byte] >> >> OK - I see where the examples came from, and I notice - >> >> int my_inst; >> my_inst=open(ā/dev/usbtmc1ā,O_RDWR); >> write(my_inst,ā*RST\nā,5); >> close(my_inst); >> >> and similarly in another place - >> >> retval=write(myfile,"*IDN?\n",6); >> >> Note that both write commands contain a byte count of the number of >> characters to be written (\n counts as one character). >> Again, the read commands contain byte counts. I'm very suspicious that a >> write command with no byte count writes nothing, but does move a buffer >> pointer. >> >> -Bill > > Does Python support/implement simular commands? Can I use > usbkeith.write("*IDN?\n",6) and something simular for the reading > commands? > > thanks, > jean > -- > http://mail.python.org/mailman/listinfo/python-list Yes of course. BUT, that isn't really a python question, it depends on how the device driver implements the function call. -Bill -- http://mail.python.org/mailman/listinfo/python-list