in sample_common.py [0:0]
def LoadIndexParam(index):
# The @topic_name is a bytes-stream on Python2, while it is a unicode-string on Python2.
# So we must call @decode to decode bytes-stream to unicode-string when runing on Python2.
# In addition, python3 has NOT @decode Attribute, so igonre the exception when runing on Python3.
if index < len(sys.argv):
if hasattr(sys.argv[1], 'decode'):
return sys.argv[index].decode('utf-8')
else:
return sys.argv[index]
else:
return None