
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2012-06-14 16:41 bypata@jegcpa.com, last changed2022-04-11 14:57 byadmin. This issue is nowclosed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| serialposix.py | pata@jegcpa.com,2012-06-14 16:41 | pyserial | ||
| Messages (3) | |||
|---|---|---|---|
| msg162805 -(view) | Author: Pat (pata@jegcpa.com) | Date: 2012-06-14 16:41 | |
Attempting to import pyserial. In module serialposix.py a dict declaration starting on line 64; baudrate_constants = { 0: 0000000, 50: 0000001, 75: 0000002, 110: 0000003, ...etc Traceback (most recent call last): File "<stdin>", line 1, in <module> File "serialposix.py", line 64 50: 0000001, ^SyntaxError: invalid tokenMacOSX 10.6.8 32bit x86 python 3.2.3 (v3.2.3:3d0686d90f55, Apr 10 2012, 11:09:56) | |||
| msg162806 -(view) | Author: Amaury Forgeot d'Arc (amaury.forgeotdarc)*![]() | Date: 2012-06-14 16:47 | |
You are importing with Python3 a module written for Python2.pyserial-2.6 comes with a "setup.py" script that will do the conversion, you should run it and not try to import the source code directly. | |||
| msg162810 -(view) | Author: R. David Murray (r.david.murray)*![]() | Date: 2012-06-14 17:39 | |
And yes, a number with leading zeros is an invalid token in Python3, because in Python2 it was an octal number, and now we spell octal as, eg, 0o0001. | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:57:31 | admin | set | github: 59274 |
| 2012-06-14 17:39:39 | r.david.murray | set | nosy: +r.david.murray messages: +msg162810 |
| 2012-06-14 16:47:48 | amaury.forgeotdarc | set | status: open -> closed nosy: +amaury.forgeotdarc messages: +msg162806 resolution: not a bug |
| 2012-06-14 16:41:06 | pata@jegcpa.com | create | |