0
我嘗試使用此代碼導入法:Pygments來做進口萊克斯錯誤
from pygments import lex
但它只返回了一個錯誤:
Traceback (most recent call last):
File "D:\samp.py", line 1, in <module>
from pygments import lex
File "C:\Python32\lib\site-packages\pygments-2.0.2-py3.2.egg\pygments\__init__.py", line 37, in <module>
from pygments.util import StringIO, BytesIO
File "C:\Python32\lib\site-packages\pygments-2.0.2-py3.2.egg\pygments\util.py", line 226
return u'[%s-%s]' % (unichr(a), unichr(b))
^
SyntaxError: invalid syntax
(我使用Python 3.2.3 IDLE)
是否有解決方案?
非常感謝,修復。 –