I have tried setting the baud rate with no success. Also I'm using port #2 because I"m using a usb to serial cable.
On Fri, Oct 23, 2009 at 7:51 PM, Chris Rebert <c...@rebertia.com> wrote: > On Thu, Oct 22, 2009 at 4:43 PM, Ronn Ross <ronn.r...@gmail.com> wrote: > > I'm using pySerial to connect to a serial port (rs232) on a windows xp > > machine. I'm using python interactive interpretor to interact with the > > device. I type the following: > > import serial > > ser = serial.Serial(2) > > ser.write("command") > > > > But this does nothing to the control. I have been able to connect via > puTTY > > to verify that the command and the device are working. Next I tried to > open > > the port before > > writing. It looks like this: > > import serial > > ser = serial.Serial(2) > > ser.open() > > > > It returns that an error. It states that I do not have permissions? I > don't > > know how to resolve either issue. Any help would be greatly appreciated. > > Have you tried setting the baud rate? (the `baudrate` param to > Serial's constructor) > Why are you using port #2 and not #0? > > Cheers, > Chris > -- > http://blog.rebertia.com >
-- http://mail.python.org/mailman/listinfo/python-list