擅长:python、mysql、java
<p>为此任务使用字符串格式。<a href="https://pyformat.info/" rel="nofollow noreferrer">More info</a></p>
<pre><code> alarms = system.alarm.queryStatus(state=["ActiveUnacked", "ClearAcked"])
for alarm in alarms:
alarm1 = alarm.getName(), alarm.getState()
my_file = open('D:\send_file3.txt','w')
my_file.write('from call import Client\n')
my_file.write('account_sid = "test"\n')
my_file.write('auth_token = "test"\n')
my_file.write('client = Client(account_sid, auth_token)\n')
my_file.write('message=client.api.account.messages.create(to="+6140000000", from_="+614000000000", body=\"{}\"').format(alarm1)
my_file.close()
</code></pre>