I am using python to communicate with GSM modem connected in my ttyUSB port.
import serial
from curses import ascii
ser=serial.Serial('/dev/ttyUSB0', 9600, timeout=3)
command = ser.write('AT+CMGR=3\r\n')
print command
Now to communicate with my modem, I pass AT commands from python, I need to print the output of the complete command string. How do I do it?