Lantronix Python Programmers Guide
This guide introduces developers to the support for the Python runtime on Lantronix line of embedded and ready-to-deploy Intelligent Gateway products. It describes how to load and run Python programs on Lantronix devices, reviews available Python modules including those that expose Lantronix specific APIs and describes sample Python programs for common use cases that provide a head-start in customizing Lantronix Intelligent Gateway platforms.
What is Python?
Python is a programming language that lets you work more quickly and integrate your systems more effectively. It is a dynamically typed, object-oriented programming language offering an elegant syntax and an extendable Python interpreter. This makes it an ideal language for scripting and rapid application development for most applications and specifically connected device applications. The Python interpreter and the extensive standard library are freely available in source or binary form for all major platforms (Windows, Linux\Unix, Mac OS X) and on machine-to-machine (M2M) or Internet of Things (IoT) focused Intelligent Gateway platforms from Lantronix.
Additional Python Reference
The Python Programming Language website (http://www.python.org) is the definitive and official source for all Python information. It also contains additional links to other Python references including other sites, books, etc. For a quick and informal introduction to Python, the tutorial at Python Tutorial is a great start.
Supported Lantronix Products
The following Lantronix products provided integrated Python runtime support.
Support for the following Lantronix products is planned (Alpha Software Available)
This section describes how to create a simple Python program and the steps to run the program on a Lantronix device.
First Program "Hello World"
Write Simple Python Program
In your favorite text editor, create a file named helloworld.py, with the following contents:
# Hello World - a simple text output program def main(): print 'Hello World!' main()