【发布时间】:2009-11-23 04:52:32
【问题描述】:
我正在尝试安装 Chris Atlee's python Poster library,以便我可以在我的脚本中使用 HTTP POST 查询上传文件。
在 python 2.3 上,当我输入 # python setup.py install 时,我收到以下错误。安装继续,但我以后不能>>> import poster。
byte-compiling build/bdist.linux-x86_64/egg/poster/encode.py to encode.pyc
File "build/bdist.linux-x86_64/egg/poster/encode.py", line 112
@classmethod
^
SyntaxError: invalid syntax
byte-compiling build/bdist.linux-x86_64/egg/poster/streaminghttp.py to streaminghttp.pyc
File "build/bdist.linux-x86_64/egg/poster/streaminghttp.py", line 114
newheaders = dict((k,v) for k,v in req.headers.items()
^
SyntaxError: invalid syntax
byte-compiling build/bdist.linux-x86_64/egg/poster/__init__.py to __init__.pyc
任何指针?
【问题讨论】:
标签: python post http-post httppostedfile http-post-vars