I am evaluating slickEdit 2009 for use in a Python project. I have installed the pySerial module and have tried their basic test at the python command line in a cygwin bash shell window:
$ python
ActivePython 2.6.4.8 (ActiveState Software Inc.) based on
Python 2.6.4 (r264:75706, Nov 3 2009, 13:23:17) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import serial
>>> ser = serial.Serial()
>>> ser
Serial<id=0xb3ddd0, open=False>(port=None, baudrate=9600, bytesize=8, parity='N', stopbits=1, timeout=None, xonxoff=0, rtscts=0, dsrdtr=0)
>>>
This creates a serial port called 'ser'.
When I try the same 3 lines in slickEdit, the 'import' succeeds, but the second line, 'ser = serial.Serial()' fails with this message:
C:\dev\cdev\Projects\pyRio>"C:\Python26\python.exe" -S -u "C:\Program Files\SlickEditV14.0.2\resource\tools\pydbgp-1.1.0/bin/pydbgp.py" -d 127.0.0.1:1835 -k slickedit "C:\dev\cdev\Projects\pyRio\serial.py"
Traceback (most recent call last):
File "C:\dev\cdev\Projects\pyRio\serial.py", line 1, in <module>
import serial
File "C:\dev\cdev\Projects\pyRio\serial.py", line 2, in <module>
ser = serial.Serial()
AttributeError: 'module' object has no attribute 'Serial'
I can user sys.path to see that the path to the 'site-packages' is correct (and it must be if the 'import' line succeeds).
Can someone explain why this works at the python command line but fails in slickedit