Welcome to subscribe to the public number: Python from program ape to programmer, or harass himself: 154.7251666
Baidu search "Qpython", click Qpython Official website.
"Qpython" is a scripting engine that integrates the Python interpreter, Console, editor, and SL4A Library. Allows you to run the Python language development program on your Android device. It's the python! on Android. In addition, it provides development tools that allow you to easily develop Python projects on Android devices.
Click Download
Point Qpython, not qpython3.
Pick a version, like I chose v2.1.0.
Click qpython-229-2.0.11.apk
Click this software
Click the Editor
Click New (the + sign in the upper right corner)
Click File
Enter ABCDEFG in front of the. py
Created successfully
#将下面的代码粘贴进去, #注意这一段文字不是代码, #然后点击下方的运行 (a triangle-shaped symbol), #运行情况是最后一张图
#import Threading Import Threading Import Androidhelper droid = Androidhelper. Android () time_i = 0 Time_end_i = def fun_timer (): Print (' Hello Timer ') Global timer global Time_i time_i = time_i + 1 If Time_i <= time_end_i:droid.cameraCapturePicture ('/storage/emulated/0/zzzz/' +str (time_i) + '. jpg ') timer = Threading. Timer (60.0,fun_timer) Timer.start () Timer = Threading. Timer (1,fun_timer) Timer.start ()
If you open another file, click the folder symbol in the upper-right corner
The script in the top right corner.
Click abcdefg.py
Click on the bottom of the run (triangle shape of the symbol)
The normal operation is to print a "Hello timer" Every 1 minutes, and take a photo and put it in the "zzzz" folder. Then stop after one hours, that is, after taking 60 shots. You can then click Enter to exit the terminal
Hack Black tech? Python code enables Android phones to monitor