Error running Pyserial
Question: I just installed Pyserial 2.6 and I have Python 2.7.3 unfortunately it either
did not install correctly or I am not using it correctly. I installed it
through terminal using the line

    
    
    sudo easy_install pyserial
    

Unfortunately it gave me 2 warnings:

    
    
    warning: no files found matching 'examples/miniterm.py'
    warning: no files found matching 'test/test_io_lib.py'
    

Other than that it seemed to install correctly.

When I run this in Python I keep getting the farther below error

    
    
    import serial
    serial_input = serial.Serial('/dev/tty/.usbmodem3d241',9600)
    while True:
        ser.readline()
    

Error:

    
    
    Traceback (most recent call last):
      File "/Users/ben/Documents/Arduino_to_Python.py", line 5, in <module>
        serial_input = serial.Serial('/dev/tty/.usbmodem3d241',9600)
      File "build/bdist.macosx-10.7-intel/egg/serial/serialutil.py", line 261, in __init__
        self.open()
      File "build/bdist.macosx-10.7-intel/egg/serial/serialposix.py", line 278, in open
        raise SerialException("could not open port %s: %s" % (self._port, msg))
    SerialException: could not open port /dev/tty/.usbmodem3d241: [Errno 20] Not a directory: '/dev/tty/.usbmodem3d241'
    

Whatever serial port I try it never seems to work. I have tried the ones in
the Arduino program Tools>Serial Port and all of the prompts at
<http://pyserial.sourceforge.net/shortintro.html#opening-serial-ports>

Any help would be greatly appreciated. Thanks.


Answer: This `serial_input = serial.Serial('/dev/tty/.usbmodem3d241',9600)` should be
without the additional `/.` between `/dev/tty` and `usbmodem3d241`.

Also, open your console and go see if `ttyusbmodem3d241` exists. In the
console type `cd /dev` then `ls` and see if it is listed.

