problem with python script

hi

i don’t manage to test what th module GM862 return when I send a AT command.

print ‘hello world’

result=MDM.send(‘AT\r’,0)

print result

c=MDM.receive(10)

print c

if c==‘OK’:

print ’ no problem’

else:

print ‘it doesn’t work’

the script is ok, I think, but i never have the message “no problem”

I think the module return ‘OK’ with other things like’ \r ’ or ’ ’

so if somebody have an idea …

thanks

cordially

Jérôme

try something like

print 'received:', repr(c)

to see exactly what is coming back

thanks a lot wiml