Rozhraní mezi Pythonem a Gammu

Gammu také obsahyje rozhraní pro Python, které vám umožní použít (většinu) funkcí Gammu z programovacího jazyka Python.

Poslední novinky

New online tools

Wammu website now offers also few online tools providing for example PDU encoding and decoding.

Vydal Michal Čihař dne 2010-08-27

Gammu 1.28.90

Gammu 1.28.90 has been just released. This release contains lot of bug fixes, especially in SMSD, AT engine and Python bindings.

Vydal Michal Čihař dne 2010-08-27

Stáhnout

Python module is distributed as part of Gammu so to download it just get Gammu. If you want to use binary package, the daemon might be included in separate binary package in your distribution, try looking for something like python-gammu.

Příklad

Použití python-gammu je celkem jednoduché, například odeslání textové zprávy provedete následujícím kouskem kódu:

import gammu

sm = gammu.StateMachine()
sm.ReadConfig()
sm.Init()

message = {
    'Text': 'python-gammu testing message', 
    'SMSC': {'Location': 1},
    'Number': '+420800123465',
}

sm.SendSMS(message)

Dokumentace

API documentation is available, but you might also find useful libGammu documentation. Please check developer documentation page for more details.

Podívejte se také na často kladené dotazy.