{"action":"created","issue":{"url":"https://api.github.com/repos/qpython-android/qpython.org/issues/30","labels_url":"https://api.github.com/repos/qpython-android/qpython.org/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/qpython-android/qpython.org/issues/30/comments","events_url":"https://api.github.com/repos/qpython-android/qpython.org/issues/30/events","html_url":"https://github.com/qpython-android/qpython.org/issues/30","id":50463467,"number":30,"title":"App launch by command line","user":{"login":"orangemango","id":9981857,"avatar_url":"https://avatars.githubusercontent.com/u/9981857?v=3","gravatar_id":"","url":"https://api.github.com/users/orangemango","html_url":"https://github.com/orangemango","followers_url":"https://api.github.com/users/orangemango/followers","following_url":"https://api.github.com/users/orangemango/following{/other_user}","gists_url":"https://api.github.com/users/orangemango/gists{/gist_id}","starred_url":"https://api.github.com/users/orangemango/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orangemango/subscriptions","organizations_url":"https://api.github.com/users/orangemango/orgs","repos_url":"https://api.github.com/users/orangemango/repos","events_url":"https://api.github.com/users/orangemango/events{/privacy}","received_events_url":"https://api.github.com/users/orangemango/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2014-11-30T17:04:12Z","updated_at":"2015-06-02T02:46:04Z","closed_at":null,"body":"Hello !\r\n\r\nI am trying to run python scripts and kivy apps by command line (with the same resultat as launched with the QPython app).\r\n\r\nBut, I got two problems :\r\n - I got non standards librarys import problems\r\n - SDL part of Kivy always fails at import (also I don't know if the android background allows kivy to start without activity and instant management)\r\n\r\nDid I miss some environnements variables or env vars are not enough to run kivy app (and all others non standars libs) by command line ?\r\n\r\nAt the moment i use this file to run python with few environnements vars :\r\n\r\n#! /system/bin/sh\r\nexport TERM=screen\r\nexport PATH=/data/data/com.hipipal.qpyplus/files/bin:/system/bin:/system/xbin\r\nexport LD_LIBRARY_PATH=/data/data/com.hipipal.qpyplus/files/lib:/data/data/com.hipipal.qpyplus/files:/data/data/com.hipipal.qpyplus/lib\r\nexport PYTHONHOME=/data/data/com.hipipal.qpyplus/files\r\nexport ANDROID_PRIVATE=/data/data/com.hipipal.qpyplus/files\r\nexport PYTHONPATH=/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/:/mnt/sdcard/com.hipipal.qpyplus/scripts\r\nexport PYTHONSTARTUP=/mnt/sdcard/com.hipipal.qpyplus/lib/python2.7/site-packages/qpythoninit.py\r\nexport PYTHONOPTIMIZE=2\r\nexport TMPDIR=/mnt/sdcard/com.hipipal.qpyplus/cache\r\nexport AP_HOST=127.0.0.1\r\nexport AP_PORT=51639\r\nexport AP_HANDSHAKE=c12edb22-7208-4b7a-8b53-f371aa385ef9\r\nexport ANDROID_PUBLIC=/mnt/sdcard/com.hipipal.qpyplus\r\nexport ANDROID_PRIVATE=/data/data/com.hipipal.qpyplus/files\r\nexport ANDROID_ARGUMENT=/mnt/sdcard/com.hipipal.qpyplus/projects/Fake_Album_Sample\r\nexport ANDROID_APP_PATH=/mnt/sdcard/com.hipipal.qpyplus/projects/Fake_Album_Sample\r\n/data/data/com.hipipal.qpyplus/files/bin/python \"$@\"\r\n\r\nRESSOURCE : wiki.qpython.org/hacker/"},"comment":{"url":"https://api.github.com/repos/qpython-android/qpython.org/issues/comments/107779625","html_url":"https://github.com/qpython-android/qpython.org/issues/30#issuecomment-107779625","issue_url":"https://api.github.com/repos/qpython-android/qpython.org/issues/30","id":107779625,"user":{"login":"Lilujie","id":12706569,"avatar_url":"https://avatars.githubusercontent.com/u/12706569?v=3","gravatar_id":"","url":"https://api.github.com/users/Lilujie","html_url":"https://github.com/Lilujie","followers_url":"https://api.github.com/users/Lilujie/followers","following_url":"https://api.github.com/users/Lilujie/following{/other_user}","gists_url":"https://api.github.com/users/Lilujie/gists{/gist_id}","starred_url":"https://api.github.com/users/Lilujie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lilujie/subscriptions","organizations_url":"https://api.github.com/users/Lilujie/orgs","repos_url":"https://api.github.com/users/Lilujie/repos","events_url":"https://api.github.com/users/Lilujie/events{/privacy}","received_events_url":"https://api.github.com/users/Lilujie/received_events","type":"User","site_admin":false},"created_at":"2015-06-02T02:46:04Z","updated_at":"2015-06-02T02:46:04Z","body":"I want to run a .py script by command line,but I don't know what env should be added,AP_HOST & AP_HANDSHAKE  &  ANDROID_ARGUMENT  & ANDROID_APP_PATH mean what ?"}}