GRRedWings / python3-android

Python 3 cross-compilation tools for Android.
BSD Zero Clause License
68 stars 17 forks source link

How to run py code provided by user #24

Closed m-anshuman2166 closed 2 years ago

m-anshuman2166 commented 2 years ago

I would like to interpret python 3 code provided as a string.

Would you like to help me / add a simple code interpreter to examples?

Regards

GRRedWings commented 2 years ago

Have you looked at the Android sample app? main.py in assets would be replaced with any python script you want to run.

m-anshuman2166 commented 2 years ago

Thanks, also could we install modules in runtime?

GRRedWings commented 2 years ago

If it's a compiled C based modules you will need to add it to the build, if it's a pure python module you can just the files into the python package. At least that is what I have done.

m-anshuman2166 commented 2 years ago

Could i provide a custom path for python file?