I have tried this with a pc running fedora.dongle is huwawei e153.but when i run the program, terminal will go to blocked state. after some time i pressed Ctrl+C. result was :

Traceback (most recent call last):
File "sms.py", line 11, in
sendatcmd('+CMGF=1')
File "sms.py", line 8, in sendatcmd
def sendatcmd(cmd):dongle.write('AT'+cmd+'r')
File "/home/uthpala/Downloads/pith/pyserial-2.6/serial/serialposix.py", line 475, in write
n = os.write(self.fd, d)
KeyboardInterrupt

What can i do for this?
This thing is helpful for my project.help me to get through. Thank You so much.