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

Gammu 1.27.92

Gammu 1.27.92 has been just released. There are just few bug fixes in this release and we're heading to 1.28.0, though there are still some rough edges.

Vydal Michal Čihař dne 2010-02-17

Gammu 1.27.91

Gammu 1.27.91 has been just released. This release brings lot of improvements in SMSD (compatibility with most Nokia phones, passing data to RunOnReceive handler in environment and new new nulll backend). It also fixes various bugs and crashes reported by users.

Vydal Michal Čihař dne 2010-02-04

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.