<<< Previous topic - Next topic >>> |
|
Author |
Message |
kdw
Joined: 05 May 2006 Posts: 1461
|
Posted: 02.05.2013, 11:42 Post subject: Python … |
|
|
Hallo Forum.
Für das IGW/925 steht nun auch eine Python-Implementierung zur Verfügung. Es kommt die Version 2.7 zum Einsatz.
Auf Grund des Python-Umfangs wird der zweite 16 Mbyte NOR-Flash exklusiv für die Python-Installation genutzt.
Gruß KDW |
|
Back to top |
|
|
kdw
Joined: 05 May 2006 Posts: 1461
|
Posted: 02.05.2013, 11:43 Post subject: Einfache Socket-Programmierung … |
|
|
Hallo Forum.
Mit Python lassen sich TCP-Client und Server-Anwendungen wesentlich einfacher als mit C/C++ realisieren. Hier ein Beispiel:
Code: | import socket
import sys
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(("127.0.0.1", 2001))
data = s.recv(1024)
while len(data):
if len(data) < 10:
sys.stdout.write(data)
data = s.recv(1024)
s.close() |
Gruß KDW |
|
Back to top |
|
|
kdw
Joined: 05 May 2006 Posts: 1461
|
|
Back to top |
|
|
kdw
Joined: 05 May 2006 Posts: 1461
|
Posted: 16.08.2013, 15:55 Post subject: Python per Kommandozeile … |
|
|
Hallo Forum.
Bevor man Python auf einem IGW/92x per Kommandozeile starten kann, müssen zwei Umgebungsvariable wie folgt gesetzt werden:
Code: | export PYTHONPATH=/mnt/lib:/mnt/lib/python27.zip
export PYTHONHOME=/mnt
python [name der python anwendung] |
Gruß KDW |
|
Back to top |
|
|
kdw
Joined: 05 May 2006 Posts: 1461
|
Posted: 14.09.2014, 07:29 Post subject: Erste Schritte … |
|
|
Hallo Forum.
Für alle, die noch nicht ganz so viel Python-Erfahrung besitzen, findet man unter
http://www.tutorialspoint.com/python/index.htm
ein sehr gutes Nachschlagewerk.
Gruß KDW |
|
Back to top |
|
|
|