在 Android 手機上使用 QPython 開發時,已進入命令列模式(見圖),想知道如何透過終端機指令執行 Python 檔案(如 hello.py)。
hello.py 檔案(可用 ls 查看)。python hello.py
cd 切換目錄,或給出相對/絕對路徑:python /sdcard/qpython/scripts/hello.py。python: not found,請確認 QPython 已正確安裝並授予儲存權限。掌握此指令,即可在手機上隨時執行 Python 腳本,方便行動開發與測試。