我尝试使用此构建应用程序 - https://github.com/awslabs/amazon-rekognition-video-analyzer/ 不幸的是,我在build.py文件中收到了syntaxerror。
def write_dir_to_zip(src, zf):
'''Write a directory tree to an open ZipFile object.'''
abs_src = os.path.abspath(src)
for dirname, subdirs, files in os.walk(src):
for filename in files:
absname = os.path.abspath(os.path.join(dirname, filename))
arcname = absname[len(abs_src) + 1:]
print 'zipping %s as %s' % (os.path.join(dirname, filename),
arcname)
zf.write(absname, arcname)
我得到的错误如下
File "build.py", line 26
arcname)) zf.write(absname, arcname)
^
SyntaxError: invalid syntax
提前致谢!