Programming language Python
Comparing Python with C++
Python code is typically 3-5 times shorter than equivalent Java code. However it is often 5-10 times shorter than equivalent C++ code. One Python programmer can finish in two months what two C++ programmers canâ€™t complete in a year. Python shines as a glue language, used to combine components written in C++.
Python is an object-oriented, strictly, dynamically typed, lexically scoped programming language. Its object model is quite flexible (single-dispatch, meta-classes, everything is an object), and somewhat similar to Basic and Pascal. The origin Python has some functional programming features: first-class functions, map(), reduce(), list comprehensions, and lexical closures. Inside of the GPRS module is a limited version in use. Anyhow, this limited version is often more than enough to cover the needs in M2M.
Python is a extremely â€œfree-formâ€ language with very few ways of invariant construction. A loop with ” FOR NEXT” can be reduced to “FOR”, because the end of the loop can be forced by shifting the next instruction left.
Comparing Python with Java
Python is expected to run slower than Java, but they also take much less time to develop. In M2M projects often the speed is less important. Most time a M2M devices is waiting for an event. Python code is much times shorter than Java code. This difference can be attributed to Pythonâ€™s built-in high-level data types and its dynamic typing.
public class HelloWorld
public static void main (String args)
if ( a > b )
print â€œHello, world!â€
if a > b :
99 bottles of beer
There is a collection programs for the Song 99 Bottles of Beer programmed in different programming languages. The song is represented in much more than 1000 different programming languages and variations.The links to Python, Java and C++ as below. The Python code is much shorter as usual.
- Python versions: http://99-bottles-of-beer.net/language-python-808.html
- Java versions: http://99-bottles-of-beer.net/language-java-3.html
- C++: http://99-bottles-of-beer.net/language-c++-108.html
Your starting point can be a ready to use Python terminal or just a plain GPRS module with Python engine. The ready to use Python terminal can be customised, the software can be written by you or by third party. Last but not least you can get a own M2M device from scratch. If you have interest in an own Python based M2M application, then just drop an email to harald.naumann (at) gsm-modem.de or use the form to get further details.