On Sep 3, 2005, at 2:05 AM, Bob Ippolito wrote:


Because "import serial" imports whatever thing it finds named serial, and it's not finding PySerial because you have a module named serial.py.  If the PySerial documentation says "name your script serial.py", then it's dumb because that won't work.

-bob


It didn't give any example filename. I wish to test something involving a serial port before going in to full development, hence the Python usage and hence "serial.py" seemed a fairly logical name based on what I was trying to do. Thanks for the explanation of why I shouldn't have done that.

I have now renamed it to "my_test.py" and am now getting somewhere. No errors at least. I was sure it was something basic and obvious (to a Python developer) and I was right. I'll remember that one for sure.

Thanks also to Robert for giving me the same advice.

/MB
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to