r/Python • u/Pescadorcito • 22h ago
Discussion Pyinstaller for android?
Hello friends, is there any way to make an APK from Windows or another operating system using a Python library similar to PyInstaller?
Convert .py in .apk?
r/Python • u/AutoModerator • 11h ago
Welcome to Free Talk Friday on /r/Python! This is the place to discuss the r/Python community (meta discussions), Python news, projects, or anything else Python-related!
Let's keep the conversation going. Happy discussing! 🌟
r/Python • u/Pescadorcito • 22h ago
Hello friends, is there any way to make an APK from Windows or another operating system using a Python library similar to PyInstaller?
Convert .py in .apk?
r/Python • u/dasMoorhuhn • 13h ago
I made myself a lib for fast parsing RAW images from my sony camera.
My old code: ```python def check_for_endian(data:bytes) -> tuple[int, int]|None:
if data[:2] == 0x4949: # "II" LE
return 1, 0
if data[:2] == 0x4D4D: # "MM" BE
return 2, 0
return None
So it was possible to compare a hex value with bytes. Now it's not possible anymore, somehow, so I had to do this:
python
def check_for_endian(data:bytes) -> tuple[int, int]|None:
header_endian = struct.unpack_from("<h", data, 0)[0]
if header_endian == 0x4949: # "II" LE
return 1, 0
if header_endian == 0x4D4D: # "MM" BE
return 2, 0
return None
```
I'm a bit confused, have I used it wrong in the first place and I was never supposed to compare a hex value with bytes?
E: I use python 3.13.9 and uv 0.9.9