开发者

Python USSD via com port

I am new to python. Is there anyway i can use python to send ussd with a phone via at+cusd commands. i can do that using hypertermina开发者_StackOverflow中文版l. i want to automate using python. thanks.


Yes. Use pyserial.

>>> import serial
>>> ser = serial.Serial(0)  # open first serial port
>>> print ser.portstr       # check which port was really used
>>> ser.write("hello")      # write a string
>>> ser.close()             # close port
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜