title: Run Python for Android (Qpython) in Android Terminal
body: <p>Python for Android (Py4A 2.6) is wonderful!!! But QPython (2.7) is a lot more powerful and continuously developed. Now I try to integrate Qpython's Python into Android (5.1 CM12) Terminal / ADB described in this Tutorial:<a href="http://wiki.qpython.org/en/diveinto/" rel="nofollow">http://wiki.qpython.org/en/diveinto/</a></p>
  
  <p>My Script to import the environment variables qpython needs looks like:</p>
  
  <pre><code>TERM=screen
  PATH=/data/data/com.hipipal.qpyplus/files/bin:/system/bin:/system/xbin
  LD_LIBRARY_PATH=.:/data/data/com.hipipal.qpyplus/files/lib/:/data/data/com.hipipal.qpyplus/files/:/data/data/com.hipipal.qpyplus/lib/
  PYTHONHOME=/data/data/com.hipipal.qpyplus/files
  ANDROID_PRIVATE=/data/data/com.hipipal.qpyplus/files
  PYTHONPATH=/storage/emulated/0/com.hipipal.qpyplus/lib/python2.7/site-packages/:/data/data/com.hipipal.qpyplus/files/lib/python2.7/site-packages/:/data/data/com.hipipal.qpyplus/files/lib/python2.7/:/data/data/com.hipipal.qpyplus/files/lib/python27.zip:/data/data/com.hipipal.qpyplus/files/lib/python2.7/lib-dynload/:/storage/emulated/0/com.hipipal.qpyplus/scripts
  PYTHONSTARTUP=/storage/emulated/0/com.hipipal.qpyplus/lib/python2.7/site-packages/qpythoninit.py
  PYTHONOPTIMIZE=2
  TMPDIR=/storage/emulated/0/com.hipipal.qpyplus/cache
  AP_HOST=127.0.0.1
  AP_PORT=58418
  AP_HANDSHAKE=01805a68-c04c-4e21-bd54-ac8732f3a8da
  ANDROID_PUBLIC=/storage/emulated/0/com.hipipal.qpyplus
  ANDROID_PRIVATE=/data/data/com.hipipal.qpyplus/files
  ANDROID_ARGUMENT=/storage/emulated/0/com.hipipal.qpyplus/scripts
  </code></pre>
  
  <p>Shell session:</p>
  
  <pre><code>u0_a101@C1905:/ $ source /sdcard/qpyenvnew.sh
  u0_a101@C1905:/ $ $python
  u0_a101@C1905:/ $ hmm do nothing?!
  </code></pre>
  
  <p>I get no output.</p>
  
  <p>I have found here on Stackoverflow the same Question but the posted solution ist a link how is down.</p>
  
  <p>Other Tutorial on throws only errors <a href="http://dinostest.com/node/28" rel="nofollow"></a> 
  <a href="http://dinostest.com/node/28" rel="nofollow">http://dinostest.com/node/28</a></p>