Message222387
| Author |
ned.deily |
| Recipients |
inglesp, ned.deily |
| Date |
2014年07月06日.00:48:30 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1404607711.45.0.0705450260089.issue21924@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
That's because there is also a standard library module named token (https://docs.python.org/3/library/token.html). When you run python, by default the current working directory is inserted at the beginning of sys.path, the list of directories searched for modules. If you have a file there that has the same name as a standard library module, e.g. token.py, it will be found first and, thus, "hide" the standard library module of the same name. Either change the name of your file so it does not conflict or make sure it is in a directory not on sys.path. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2014年07月06日 00:48:31 | ned.deily | set | recipients:
+ ned.deily, inglesp |
| 2014年07月06日 00:48:31 | ned.deily | set | messageid: <1404607711.45.0.0705450260089.issue21924@psf.upfronthosting.co.za> |
| 2014年07月06日 00:48:31 | ned.deily | link | issue21924 messages |
| 2014年07月06日 00:48:30 | ned.deily | create |
|