新手用Python测试API文档中代码,出错,求帮助。
import matplotlib.pyplot as plt
import json
def main():
plt.plot([3,6,2,4,7,1])
LogStatus(plt)
table = {type: ‘table’, title: ‘持仓信息’, cols: [‘列1’, ‘列2’], rows: [ [‘abc’, ‘def’], [‘ABC’, ‘support color #ff0000’]]}
LogStatus(’' + JSON.stringify(table)+'
’) # JSON序列化后两边加上字符, 视为一个复杂消息格式(当前支持表格)
LogStatus('第一行消息\n
’ + JSON.stringify(table)+’\n第三行消息') # 表格信息也可以在多行中出现
LogStatus('
’ + JSON.stringify([table, table])+‘`’) # 支持多个表格同时显示, 将以TAB显示到一组里