本文整理汇总了Python中interface.Interface.request方法的典型用法代码示例。如果您正苦于以下问题:Python Interface.request方法的具体用法?Python Interface.request怎么用?Python Interface.request使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类interface.Interface
的用法示例。
在下文中一共展示了Interface.request方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: new_interface
# 需要导入模块: from interface import Interface [as 别名]
# 或者: from interface.Interface import request [as 别名]
def new_interface(self, server, socket):
# todo: get tip first, then decide which checkpoint to use.
self.add_recent_server(server)
interface = Interface(server, socket)
interface.blockchain = None
interface.tip_header = None
interface.tip = 0
interface.mode = 'default'
interface.request = None
self.interfaces[server] = interface
self.queue_request('blockchain.headers.subscribe', [], interface)
if server == self.default_server:
self.switch_to_interface(server)
示例2: test_req
# 需要导入模块: from interface import Interface [as 别名]
# 或者: from interface.Interface import request [as 别名]
def test_req(self):
interface = Interface()
print(interface.request('qf'))
示例3: int
# 需要导入模块: from interface import Interface [as 别名]
# 或者: from interface.Interface import request [as 别名]
# Configuracoes dos plots
plt.ion()
fig = plt.figure()
plot_sz = 200 + int(amt_vars / 2 + amt_vars % 2)*10
axs = [fig.add_subplot(plot_sz + x + 1) for x in var_ids]
lines = []
for i in var_ids:
ax = axs[i]
line, = ax.plot([], [], 'r-')
lines.append(line)
ax.set_title(titles[i])
while True:
t.append(sample_id)
for i in var_ids:
vals[i].append(interface.request(var_cmds[i]))
lines[i].set_data(t, vals[i])
axs[i].relim()
axs[i].autoscale()
fig.tight_layout()
fig.canvas.draw()
time.sleep(.1)
sample_id = sample_id + 1