(wechat) ➜ ~ python
Python 3.5.2 (default, Dec 22 2016, 15:41:29)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.38)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pdir
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/kevin/.pyenv/versions/wechat/lib/python3.5/site-packages/pdir/__init__.py", line 46
print '-' + attribute + '-'
^
SyntaxError: Missing parentheses in call to 'print'
可以看出,写法是Python2的
我的环境: 在虚拟环境中的Python,版本:3.5.2(安装pdir的过程中没出现任何问题)