Rainbow Electronics GM862-GPS User Manual
Page 3

Easy Script
in Python
80000ST10020a Rev.8 - 01/10/08
Reproduction forbidden without Telit Communications S.p.A. written authorization - All Rights Reserved
page 3 of 100
Contents
1.1
Overview..................................................................................................................................................8
1.2
Python 1.5.2+ Copyright Notice ..........................................................................................................10
1.3
Python installation................................................................................................................................11
1.4
Python implementation description ....................................................................................................12
1.5
Introduction to Python.........................................................................................................................14
1.5.1
Data types ..........................................................................................................................................................14
1.5.2
Operators............................................................................................................................................................15
1.5.3
Compound statements........................................................................................................................................15
1.5.4
Conditional execution ........................................................................................................................................16
1.5.5
Loops .................................................................................................................................................................16
1.5.6
Resources...........................................................................................................................................................17
1.6
Python core supported features...........................................................................................................18
2.1
CMUX and Python ...............................................................................................................................19
2.2
MDM built-in module ..........................................................................................................................20
2.2.1
MDM.send(string, timeout) ...............................................................................................................................20
2.2.2
MDM.receive(timeout) ......................................................................................................................................20
2.2.3
MDM.read().......................................................................................................................................................21
2.2.4
MDM.sendbyte(byte, timeout)...........................................................................................................................21
2.2.5
MDM.receivebyte(timeout) ...............................................................................................................................22
2.2.6
MDM.readbyte()................................................................................................................................................22
2.2.7
MDM.getDCD() ................................................................................................................................................22
2.2.8
MDM.getCTS()..................................................................................................................................................23
2.2.9
MDM.getDSR() .................................................................................................................................................23
2.2.10
MDM.getRI() ................................................................................................................................................23
2.2.11
MDM.setRTS(RTS_value)............................................................................................................................23
2.2.12
MDM.setDTR(DTR_value) ..........................................................................................................................24
2.3
MDM2 built-in module ........................................................................................................................25
2.3.1
MDM2.send(string, timeout) .............................................................................................................................25
2.3.2
MDM2.receive(timeout) ....................................................................................................................................26
2.3.3
MDM2.read().....................................................................................................................................................26
2.3.4
MDM2.sendbyte(byte, timeout).........................................................................................................................26
2.3.5
MDM2.receivebyte(timeout) .............................................................................................................................27
2.3.6
MDM2.readbyte() ..............................................................................................................................................27
2.3.7
MDM2.getDCD() ..............................................................................................................................................27
2.3.8
MDM2.getCTS()................................................................................................................................................28
2.3.9
MDM2.getDSR() ...............................................................................................................................................28
2.3.10
MDM2.getRI() ..............................................................................................................................................28
2.3.11
MDM2.setRTS(RTS_value)..........................................................................................................................28
2.3.12
MDM2.setDTR(DTR_value) ........................................................................................................................29