QPython 3 is installed on my smartphone. In the console, it is launched via the qpython.sh script, and here is its contents:
#!/system/bin/sh DIR=${0%/*} . $DIR/init.sh && $DIR/python "$@" && $DIR/end.sh All these files (qpython, init, python, end) I threw in / system / xbin, since this path is in global variables. Everything is still working.
init.sh creates new variables to run the binary in this form:
#!/system/bin/sh export TERM=screen export PATH=/data/data/com.hipipal.qpy3/files/bin:/sbin:/system/bin:/system/xbin < и еще много много подобных строк > If you type init.sh && python in the console, then Python gives an error, loading different libraries and not, of course, a fatal error. There was a question, why in the case of launch via qpython.sh Python perfectly sees its variables and finds everything necessary for it, and in the second case it does not?