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
精彩评论