Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #16292 > unrolled thread

[ANN] Android Debug Bridge (ADB) Scripting Language For Android (SL4A) convenience library

Started byStef Mientki <stef.mientki@gmail.com>
First post2011-11-27 17:46 +0100
Last post2011-11-27 17:46 +0100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  [ANN]  Android Debug Bridge (ADB)  Scripting Language For Android (SL4A)  convenience library Stef Mientki <stef.mientki@gmail.com> - 2011-11-27 17:46 +0100

#16292 — [ANN] Android Debug Bridge (ADB) Scripting Language For Android (SL4A) convenience library

FromStef Mientki <stef.mientki@gmail.com>
Date2011-11-27 17:46 +0100
Subject[ANN] Android Debug Bridge (ADB) Scripting Language For Android (SL4A) convenience library
Message-ID<mailman.3076.1322412393.27778.python-list@python.org>
hello,

The information on ADB / SL4A is quiet overwhelming.
Despite that, especially for people, not familiar with Linux, it's not an easy task to get their 
first program running.
This library allows you to easy upload and run Python files on a Android device, without pressing 
any button on the Android device.

After installing SL4A and Py4A on the Android device, and ADB on the hostmachine, it's just a matter 
of connecting the USB cable between Android device and host-PC, and run the program.

One of the simplest program that will run out of the box (without touching any button on the Android 
device) :

# *****************************************************
from adb_sl4a_support import ADB_Connection

ADB = ADB_Connection ()
print ADB

# Create a simple program
Simple_Program = """
import android
droid = android.Android (( '%s', %s ))
droid.makeToast ( "Wasn't that easy?")
""" % ( ADB.SL4A_Servers [-1][0], ADB.SL4A_Servers [-1][1] )

# execute the program (this will run the program from the host PC !!)
exec ( Simple_Program )
# *****************************************************

you can find the library here:
http://code.google.com/p/pylab-works/downloads/detail?name=adb_sl4a_support.py&can=2&q=

cheers,
Stef

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web