Run python script on android via one-click file extraction

Asked

Viewed 1,633 times

-1

Talk to me guys, How do I convert a script made in python to run on android? My script is very simple, only to extract a file that will always stay in the same place, do not need a graphical interface for it, just need an icon I click and it does this file extraction to the point that any layman simply click the icon.

Thank you.

Here I did the test in windows.

'''
Programa para apagar a pasta com todo o conteúdo interno
e depois descompactar.
'''

import shutil

shutil.rmtree('C:\\teste')

import zipfile

fantasy_zip = zipfile.ZipFile('C:\\teste.zip')
fantasy_zip.extractall('C:\\')

fantasy_zip.close()

1 answer

1

You can use the Qpython to run your code because it works as a IDLE inside your device.

However, to "make an icon" you need to generate a ". apk" and for that there is the framework "Buildozer" that generates the ".apk" you can install on your android.

To recap, you must:

  1. Install the framework "Buildozer"
  2. Create the ".apk" with the same
  3. Install the app in his android

Browser other questions tagged

You are not signed in. Login or sign up in order to post.