r/Python 11h ago

Daily Thread Friday Daily Thread: r/Python Meta and Free-Talk Fridays

6 Upvotes

Weekly Thread: Meta Discussions and Free Talk Friday 🎙️

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!

How it Works:

  1. Open Mic: Share your thoughts, questions, or anything you'd like related to Python or the community.
  2. Community Pulse: Discuss what you feel is working well or what could be improved in the /r/python community.
  3. News & Updates: Keep up-to-date with the latest in Python and share any news you find interesting.

Guidelines:

Example Topics:

  1. New Python Release: What do you think about the new features in Python 3.11?
  2. Community Events: Any Python meetups or webinars coming up?
  3. Learning Resources: Found a great Python tutorial? Share it here!
  4. Job Market: How has Python impacted your career?
  5. Hot Takes: Got a controversial Python opinion? Let's hear it!
  6. Community Ideas: Something you'd like to see us do? tell us.

Let's keep the conversation going. Happy discussing! 🌟


r/Python 22h ago

Discussion Pyinstaller for android?

4 Upvotes

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 13h ago

Discussion It seems like there was a change for how hex values and bytes can be compared

0 Upvotes

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