python使用smspdu发送短信

2024-09-27 14:18:05 发布

您现在位置:Python中文网/ 问答频道 /正文

我安装了pythonsmpdu1.0,但是我遇到了这个问题,我不知道如何解决它

>>> from smspdu import SMS_SUBMIT
>>> pdu = SMS_SUBMIT.create('me', '+xxxx', 'hello, world')
>>> pdu.toPDU()
'010016D02B1AEC46ABC562315C4C0600000CE8329BFD6681EE6F399B0C'
>>> pdu = smspdu.SMS_SUBMIT.fromPDU(_, 'sender')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'smspdu' is not defined

调制解调器安装正确,因为我可以使用picocom和at命令发送短消息


Tags: fromimporthelloworldcreatesmssenderme

热门问题