I recently installed QPython version-1.2.1 on my Android phone, which is running on Android 4.2.2 Jelly-Bean. I can use the console on QPython to execute some python commands, but having problem running the helloworld.py script that comes with QPython the first time it is installed.
helloworld.py:
#-*-coding:utf8;-*-
#qpy:console
#qpy:2
import androidhelper
droid = androidhelper.Android()
line = droid.dialogGetInput()
s = "Hello, %s" % (line.result,)
droid.makeToast(s)
The output of console after running the file helloworld.py is this:
Traceback (most recent call last):
File "/storage/sdcard0/com.hipipal.qpyplus/scripts/helloworld.py", line 12, in <module>
droid = androidhelper.Android()
File "/storage/sdcard0/com.hipipal.qpyplus/lib/python2.7/site-packages/androidhelper/sl4a.py", line 34, in __init__
self.conn = socket.create_connection(addr)
File "/QPython/QPython2-core/build/python-install/lib/python2.7/socket.py", line 553, in create_connection
socket.gaierror: [Errno 7] no address associated with hostname.
androidhelper module methods does not work either, if called from console.