Difference between revisions of "Lantronix Python Programmers Guide"

From Lantronix Wiki!
Jump to navigation Jump to search
Line 25: Line 25:
 
=== Supported Lantronix Products ===
 
=== Supported Lantronix Products ===
 
The following Lantronix products provided integrated Python runtime support.
 
The following Lantronix products provided integrated Python runtime support.
 +
 +
* [http://www.lantronix.com/device-networking/external-device-servers/premierwave-xc-hspa.html PremierWave XC HSPA+]
 +
* [http://www.lantronix.com/device-networking/external-device-servers/premierwave-xn.html PremierWave XN]
 +
 +
Support for the following Lantronix products is planned (Alpha Software Available)
 +
 +
* [http://www.lantronix.com/device-networking/external-device-servers/premierwave-xc.html PremierWave XC (GRPS)]
 +
* [http://www.lantronix.com/device-networking/embedded-device-servers/premierwave-en.html PremierWave EN]
 +
* [http://www.lantronix.com/device-networking/embedded-device-servers/premierwave-se1000.html PremierWave SE1000]
 +
 +
== Getting Started ==
 +
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:
 +
 +
<nowiki>
 +
# Hello World - a simple text output program
 +
def main():
 +
print 'Hello World!'
 +
 +
main()</nowiki>
 +
 +
==== Transfer Program Onto Lantronix Device ====
 +
 +
==== Run The Program ====

Revision as of 03:28, 18 November 2014


Introduction

Overview

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)

Getting Started

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()

Transfer Program Onto Lantronix Device

Run The Program