On Mon, Feb 9, 2015 at 1:20 PM, Brian <brian.from...@gmail.com> wrote: > I am also seeing this in my Mac Mavericks Python 3 installation when I use > just the built-in logging library. Again, a tiny example executable script > and the results: > > $ cat test2.py > #!/usr/bin/env python3 > import logging > logging.info("TEST2 starting") > > $ ./test2.py > Traceback (most recent call last): > File "./test2.py", line 3, in <module> > import logging > File > "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/logging/__init__.py", > line 26, in <module> > import sys, os, time, io, traceback, warnings, weakref, collections > File > "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/traceback.py", > line 3, in <module> > import linecache > File > "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/linecache.py", > line 10, in <module> > import tokenize > File > "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/tokenize.py", > line 40, in <module> > __all__ = token.__all__ + ["COMMENT", "tokenize", "detect_encoding", > AttributeError: 'module' object has no attribute '__all__' > > Googling hasn't helped track this one down. In lieu of an answer, some > pointers to tools or other things to look for would be greatly appreciated. > Thanks!
Try this, from wherever test2.py lives: python3 -c "import token;print(token.__file__)" You should get back something akin to "/usr/lib64/python3.4/token.py" (however that translates to Mac). If instead you get the path to some file of your own, rename your file. Hope this helps, -- Zach -- https://mail.python.org/mailman/listinfo/python-list