ValueError: compile(): unrecognised flags error no matter what IDE I use.
I keep getting this error no matter what IDE i use or what ORM command I use.
It all started when I was going back and forth betwen powershell and bash inside of cursor and vs code. I was doing this because I was learning flutter. Any help fixing this would greatly help. Thanks!
/r/djangolearning
https://redd.it/1mgg14m
$ python `manage.py` shellPython 3.10.0 (default, Jul 20 2022, 12:26:04) [MSC v.1929 64 bit (AMD64)] on win32Type "help", "copyright", "credits" or "license" for more information.(InteractiveConsole)>>> from landingpage.models import PagesValueError: compile(): unrecognised flags>>>I keep getting this error no matter what IDE i use or what ORM command I use.
It all started when I was going back and forth betwen powershell and bash inside of cursor and vs code. I was doing this because I was learning flutter. Any help fixing this would greatly help. Thanks!
/r/djangolearning
https://redd.it/1mgg14m
Reddit
From the djangolearning community on Reddit
Explore this post and more from the djangolearning community
Optional chaining operator in Python
I'm trying to implement the optional chaining operator (
## 1. None
myobj = Optional(None)
result = (
myobj # OptionalNone
.attr1 # OptionalNone
.attr2 # OptionalNone
.attr3 # OptionalNone
.value # None
) # None
## 2. Nested Objects
@dataclass
class A:
attr3: int
@dataclass
class B:
attr2: A
@dataclass
class C:
/r/Python
https://redd.it/1mid7mt
I'm trying to implement the optional chaining operator (
?.) from JS in Python. The idea of this implementation is to create an Optional class that wraps a type T and allows getting attributes. When getting an attribute from the wrapped object, the type of result should be the type of the attribute or None. For example:## 1. None
myobj = Optional(None)
result = (
myobj # OptionalNone
.attr1 # OptionalNone
.attr2 # OptionalNone
.attr3 # OptionalNone
.value # None
) # None
## 2. Nested Objects
@dataclass
class A:
attr3: int
@dataclass
class B:
attr2: A
@dataclass
class C:
/r/Python
https://redd.it/1mid7mt
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Django bugfix release issued: 5.2.5
https://www.djangoproject.com/weblog/2025/aug/06/bugfix-releases/
/r/django
https://redd.it/1mj0bbd
https://www.djangoproject.com/weblog/2025/aug/06/bugfix-releases/
/r/django
https://redd.it/1mj0bbd
Django Project
Django bugfix release issued: 5.2.5
Posted by Sarah Boyce on Aug. 6, 2025
I finish my first app with Python/Kivy
Hi everyone!
I just finished developing Minimal-Lyst, a lightweight music player built using Python and Kivy.
It supports .mp3, .ogg, and .wav files, has a clean interface, and allows users to customize themes by swapping image assets.
I'd love to hear your thoughts, feedback, or suggestions for improvement!
GitHub repo:
https://github.com/PGFerraz/Minimal-Lyst-Music-PLayer
/r/Python
https://redd.it/1mj5atd
Hi everyone!
I just finished developing Minimal-Lyst, a lightweight music player built using Python and Kivy.
It supports .mp3, .ogg, and .wav files, has a clean interface, and allows users to customize themes by swapping image assets.
I'd love to hear your thoughts, feedback, or suggestions for improvement!
GitHub repo:
https://github.com/PGFerraz/Minimal-Lyst-Music-PLayer
/r/Python
https://redd.it/1mj5atd
GitHub
GitHub - PGFerraz/Minimal-Lyst-Music-PLayer: A minimalistic music player with a retro-inspired GUI, built with Python and Kivy.
A minimalistic music player with a retro-inspired GUI, built with Python and Kivy. - PGFerraz/Minimal-Lyst-Music-PLayer
Looking for a reliable way to extract structured data from messy PDFs ?
I’ve seen a lot of folks here looking for a clean way to parse documents (even messy or inconsistent PDFs) and extract structured data that can actually be used in production.
Thought I’d share Retab.com, a developer-first platform built to handle exactly that.
🧾 Input: Any PDF, DOCX, email, scanned file, etc.
📤 Output: Structured JSON, tables, key-value fields,.. based on your own schema
What makes it work :
\- prompt fine-tuning: You can tweak and test your extraction prompt until it’s production-ready
\- evaluation dashboard: Upload test files, iterate on accuracy, and monitor field-by-field performance
\- API-first: Just hit the API with your docs, get clean structured results
Pricing and access :
\- free plan available (no credit card)
\- paid plans start at $0.01 per credit, with a simulator on the site
Use case : invoices, CVs, contracts, RFPs, … especially when document structure is inconsistent.
Just sharing in case it helps someone, happy to answer Qs or show examples if anyone’s working on this.
/r/Python
https://redd.it/1mj459n
I’ve seen a lot of folks here looking for a clean way to parse documents (even messy or inconsistent PDFs) and extract structured data that can actually be used in production.
Thought I’d share Retab.com, a developer-first platform built to handle exactly that.
🧾 Input: Any PDF, DOCX, email, scanned file, etc.
📤 Output: Structured JSON, tables, key-value fields,.. based on your own schema
What makes it work :
\- prompt fine-tuning: You can tweak and test your extraction prompt until it’s production-ready
\- evaluation dashboard: Upload test files, iterate on accuracy, and monitor field-by-field performance
\- API-first: Just hit the API with your docs, get clean structured results
Pricing and access :
\- free plan available (no credit card)
\- paid plans start at $0.01 per credit, with a simulator on the site
Use case : invoices, CVs, contracts, RFPs, … especially when document structure is inconsistent.
Just sharing in case it helps someone, happy to answer Qs or show examples if anyone’s working on this.
/r/Python
https://redd.it/1mj459n
Retab
Retab - Ship next generation document automations
Build powerful document processing automations with just a few lines of code. Extract structured data from PDFs, images, and reports using AI-powered schema generation.
Using AI to convert Perl Power Tools to Python
I maintain a project called Perl Power Tools which was originally started in 1999 by Tom Christiansen to provide Windows the tools that Unix people expect. Although it's 26 years later, I'm still maintaining the project mostly because it's not that demanding and it's fun.
Now, Jeffery S. Haemerhas started the Python Power Tools project to automatically port those to Python. I don't have any part of that, but I'm interested in how it will work out and what won't translate well. Some of this is really old 1990s style Perl and is bad style today, especially with decades of Perl slowly improving.
/r/Python
https://redd.it/1mjanx3
I maintain a project called Perl Power Tools which was originally started in 1999 by Tom Christiansen to provide Windows the tools that Unix people expect. Although it's 26 years later, I'm still maintaining the project mostly because it's not that demanding and it's fun.
Now, Jeffery S. Haemerhas started the Python Power Tools project to automatically port those to Python. I don't have any part of that, but I'm interested in how it will work out and what won't translate well. Some of this is really old 1990s style Perl and is bad style today, especially with decades of Perl slowly improving.
/r/Python
https://redd.it/1mjanx3
GitHub
GitHub - briandfoy/PerlPowerTools: Perl Power Tools
Perl Power Tools. Contribute to briandfoy/PerlPowerTools development by creating an account on GitHub.
Thursday Daily Thread: Python Careers, Courses, and Furthering Education!
# Weekly Thread: Professional Use, Jobs, and Education 🏢
Welcome to this week's discussion on Python in the professional world! This is your spot to talk about job hunting, career growth, and educational resources in Python. Please note, this thread is not for recruitment.
---
## How it Works:
1. Career Talk: Discuss using Python in your job, or the job market for Python roles.
2. Education Q&A: Ask or answer questions about Python courses, certifications, and educational resources.
3. Workplace Chat: Share your experiences, challenges, or success stories about using Python professionally.
---
## Guidelines:
- This thread is not for recruitment. For job postings, please see r/PythonJobs or the recruitment thread in the sidebar.
- Keep discussions relevant to Python in the professional and educational context.
---
## Example Topics:
1. Career Paths: What kinds of roles are out there for Python developers?
2. Certifications: Are Python certifications worth it?
3. Course Recommendations: Any good advanced Python courses to recommend?
4. Workplace Tools: What Python libraries are indispensable in your professional work?
5. Interview Tips: What types of Python questions are commonly asked in interviews?
---
Let's help each other grow in our careers and education. Happy discussing! 🌟
/r/Python
https://redd.it/1mjkyyw
# Weekly Thread: Professional Use, Jobs, and Education 🏢
Welcome to this week's discussion on Python in the professional world! This is your spot to talk about job hunting, career growth, and educational resources in Python. Please note, this thread is not for recruitment.
---
## How it Works:
1. Career Talk: Discuss using Python in your job, or the job market for Python roles.
2. Education Q&A: Ask or answer questions about Python courses, certifications, and educational resources.
3. Workplace Chat: Share your experiences, challenges, or success stories about using Python professionally.
---
## Guidelines:
- This thread is not for recruitment. For job postings, please see r/PythonJobs or the recruitment thread in the sidebar.
- Keep discussions relevant to Python in the professional and educational context.
---
## Example Topics:
1. Career Paths: What kinds of roles are out there for Python developers?
2. Certifications: Are Python certifications worth it?
3. Course Recommendations: Any good advanced Python courses to recommend?
4. Workplace Tools: What Python libraries are indispensable in your professional work?
5. Interview Tips: What types of Python questions are commonly asked in interviews?
---
Let's help each other grow in our careers and education. Happy discussing! 🌟
/r/Python
https://redd.it/1mjkyyw
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Connecting AI Agents to Jupyter via MCP for Interactive Data Projects
https://glama.ai/blog/2025-08-07-using-mcp-with-jupyter-notebooks-agent-driven-workflow-in-python
/r/IPython
https://redd.it/1mjj3s3
https://glama.ai/blog/2025-08-07-using-mcp-with-jupyter-notebooks-agent-driven-workflow-in-python
/r/IPython
https://redd.it/1mjj3s3
Glama – MCP Hosting Platform
Discover how to integrate MCP servers with Jupyter notebooks. Learn to call notebook tools from AI agents to execute code, manage cells, and interact dynamically using Python.
Best Frontend Framework
what do you suggest is best frotnend framework libraary for DJango flask python based backend framework in web devalopment i am a devaloper but in MERN AND NEXT meaning i have only work in JS framwork for backend so what will you suggest ?
/r/djangolearning
https://redd.it/1mja974
what do you suggest is best frotnend framework libraary for DJango flask python based backend framework in web devalopment i am a devaloper but in MERN AND NEXT meaning i have only work in JS framwork for backend so what will you suggest ?
/r/djangolearning
https://redd.it/1mja974
Reddit
From the djangolearning community on Reddit
Explore this post and more from the djangolearning community
Illnesses or Conditions Among Programmers
Hey coders, I'm conducting research on the most common health issues among programmers—whether physical, psychological, or emotional—such as joint problems, eye strain, anxiety, migraines, sleep disorders, and others.
I believe it's a topic that doesn't get enough attention, and I'd really appreciate your input.
The direct question is:
Have you developed any condition as a result of spending long hours in front of a computer? What are you doing to manage it, and what advice would you give to the next generation of programmers to help them avoid it?
/r/flask
https://redd.it/1mjl3gv
Hey coders, I'm conducting research on the most common health issues among programmers—whether physical, psychological, or emotional—such as joint problems, eye strain, anxiety, migraines, sleep disorders, and others.
I believe it's a topic that doesn't get enough attention, and I'd really appreciate your input.
The direct question is:
Have you developed any condition as a result of spending long hours in front of a computer? What are you doing to manage it, and what advice would you give to the next generation of programmers to help them avoid it?
/r/flask
https://redd.it/1mjl3gv
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Bytecode for multiple Python versions
Hi all,
I would like to be able to generate the bytecode (pyc) for a given source file containing the source code for a class (let's call it Foo). I then have another source file containing the code for a second class (Foo2) that inherits from the first one (Foo).
By doing so, I can distribute the sources of the second class (Foo2) along with the bytecode of the first class (Foo). In this way the user won't have access to the code in Foo and still have access to some of the methods (overloaded) in the Foo2 class.
I do this for teaching some stuff. The goal would be that I can distribute the class Foo2 containing the prototypes of the methods that I want students to implement. Additionally the can very easily compare their results with those generated with the method of the parent class. The advantages of this is that I can hide some methods that might not be relevant for teaching purposes (reading, writing, plotting, etc) making the code easier to understand for students.
The problem is that I would have to generate the bytecode of Foo for many different python versions, so I was wondering if someone has a
/r/Python
https://redd.it/1mjw1y0
Hi all,
I would like to be able to generate the bytecode (pyc) for a given source file containing the source code for a class (let's call it Foo). I then have another source file containing the code for a second class (Foo2) that inherits from the first one (Foo).
By doing so, I can distribute the sources of the second class (Foo2) along with the bytecode of the first class (Foo). In this way the user won't have access to the code in Foo and still have access to some of the methods (overloaded) in the Foo2 class.
I do this for teaching some stuff. The goal would be that I can distribute the class Foo2 containing the prototypes of the methods that I want students to implement. Additionally the can very easily compare their results with those generated with the method of the parent class. The advantages of this is that I can hide some methods that might not be relevant for teaching purposes (reading, writing, plotting, etc) making the code easier to understand for students.
The problem is that I would have to generate the bytecode of Foo for many different python versions, so I was wondering if someone has a
/r/Python
https://redd.it/1mjw1y0
Reddit
From the Python community on Reddit: Bytecode for multiple Python versions
Explore this post and more from the Python community
What python based game engine would you recommend?
For some background info, I have been using python for school since 2024 but i'm still kinda grasping some aspects of it. For my school project, I have decided to create a video game. For context, the game is supposed to have a story aspect at first, but then after the story is completed, it is more free play. Like the player gets to walk around and interact with the world. I plan on having these world interactions being either connected to a crafting system or combat system. Currently I'm torn between using either pygame or pyglet.
Any advice on which engine I should use? Or any recommendations on a completely different game engine to use?
Just looking for some opinions!
/r/Python
https://redd.it/1mjw40b
For some background info, I have been using python for school since 2024 but i'm still kinda grasping some aspects of it. For my school project, I have decided to create a video game. For context, the game is supposed to have a story aspect at first, but then after the story is completed, it is more free play. Like the player gets to walk around and interact with the world. I plan on having these world interactions being either connected to a crafting system or combat system. Currently I'm torn between using either pygame or pyglet.
Any advice on which engine I should use? Or any recommendations on a completely different game engine to use?
Just looking for some opinions!
/r/Python
https://redd.it/1mjw40b
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Where do enterprises run analytic python code?
I work at a regional bank. We have zero python infrastructure; as in data scientists and analysts will download and install python on their local machine and run the code there.
There’s no limiting/tooling consistency, no environment expectations or dependency management and it’s all run locally on shitty hardware.
I’m wondering what largeish enterprises tend to do. Perhaps a common server to ssh into? Local analysis but a common toolset? Any anecdotes would be valuable :)
/r/Python
https://redd.it/1mk1vc7
I work at a regional bank. We have zero python infrastructure; as in data scientists and analysts will download and install python on their local machine and run the code there.
There’s no limiting/tooling consistency, no environment expectations or dependency management and it’s all run locally on shitty hardware.
I’m wondering what largeish enterprises tend to do. Perhaps a common server to ssh into? Local analysis but a common toolset? Any anecdotes would be valuable :)
/r/Python
https://redd.it/1mk1vc7
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
What I believe to be a minor change, caused my flask startup to break...can someone explain why?
The following are 2 rudimentary test pages. One is just a proof of concept button toggle. The second one adds toggleing gpio pins on my pi's button actions.
The first one could be started with flask run --host=0.0.0.0 The second requires: FLASK\_APP=app.routes flask run --host=0.0.0.0
from flask import Flask, render_template
app = Flask(__name__)
led1_state = False
led2_state = False
.route("/")
def index():
return render_template("index.html", led1=led1_state, led2=led2_state)
.route("/toggle/<int:led>")
def toggle(led):
global led1_state, led2_state
if led == 1:
led1_state = not led1_state
elif led == 2:
led2_state = not led2_state
return render_template("index.html", led1=led1_state, led2=led2_state)
/r/flask
https://redd.it/1mkbhyj
The following are 2 rudimentary test pages. One is just a proof of concept button toggle. The second one adds toggleing gpio pins on my pi's button actions.
The first one could be started with flask run --host=0.0.0.0 The second requires: FLASK\_APP=app.routes flask run --host=0.0.0.0
from flask import Flask, render_template
app = Flask(__name__)
led1_state = False
led2_state = False
.route("/")
def index():
return render_template("index.html", led1=led1_state, led2=led2_state)
.route("/toggle/<int:led>")
def toggle(led):
global led1_state, led2_state
if led == 1:
led1_state = not led1_state
elif led == 2:
led2_state = not led2_state
return render_template("index.html", led1=led1_state, led2=led2_state)
/r/flask
https://redd.it/1mkbhyj
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Friday Daily Thread: r/Python Meta and Free-Talk Fridays
# 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:
All topics should be related to Python or the /r/python community.
Be respectful and follow Reddit's Code of Conduct.
## 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
https://redd.it/1mkg85s
# 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:
All topics should be related to Python or the /r/python community.
Be respectful and follow Reddit's Code of Conduct.
## 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
https://redd.it/1mkg85s
Redditinc
Reddit Rules
Reddit Rules - Reddit
Setting up a Windows 2016 server to run a flask app
greetings,
I have a windows 2016 server that I’m having a real issue trying to setup to serve out a flask app. I’ve googled several “how tos” and they just don’t seem to work right. Can someone point me to an actual step by step tutorial on how to set it up? I need this running on a windows server due to having issues connecting Linux machines to a remote mmsql database server.
thanks
\------UPDATE--------
I abandoned the idea of running this on Windows and instead got it working on Linux. So much easier.
Thanks for the input.
/r/flask
https://redd.it/1mi71lg
greetings,
I have a windows 2016 server that I’m having a real issue trying to setup to serve out a flask app. I’ve googled several “how tos” and they just don’t seem to work right. Can someone point me to an actual step by step tutorial on how to set it up? I need this running on a windows server due to having issues connecting Linux machines to a remote mmsql database server.
thanks
\------UPDATE--------
I abandoned the idea of running this on Windows and instead got it working on Linux. So much easier.
Thanks for the input.
/r/flask
https://redd.it/1mi71lg
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
D Can LLMs Have Accurate World Models?
I have seen many articles (one example https://aiguide.substack.com/p/llms-and-world-models-part-1) stating that LLMs have no coherent/effective world models and because of this their accuracy is inherently limited. Can this obstacle be overcome, and if not why?
/r/MachineLearning
https://redd.it/1mkelg5
I have seen many articles (one example https://aiguide.substack.com/p/llms-and-world-models-part-1) stating that LLMs have no coherent/effective world models and because of this their accuracy is inherently limited. Can this obstacle be overcome, and if not why?
/r/MachineLearning
https://redd.it/1mkelg5
Substack
LLMs and World Models, Part 1
How do Large Language Models Make Sense of Their “Worlds”?
Django Learning Path 2025
Hello all,
my question is quite easy and hard at the same time: What would be an optimized learning path for learning Django in 2025?
In a future job opportunity I would be tasked with developing an existing Django project, also enhance features and do maintenance for an existing Netbox deployment + custom plugins.
My time constraints would allow for about an hour of learning per day for 4-5 months from now on.
I have some prior Python experience in a professional context, but more on the Flask and functions-framework side of life.
I'm happy about every useful tip, so thank you in advance!
/r/django
https://redd.it/1mka58y
Hello all,
my question is quite easy and hard at the same time: What would be an optimized learning path for learning Django in 2025?
In a future job opportunity I would be tasked with developing an existing Django project, also enhance features and do maintenance for an existing Netbox deployment + custom plugins.
My time constraints would allow for about an hour of learning per day for 4-5 months from now on.
I have some prior Python experience in a professional context, but more on the Flask and functions-framework side of life.
I'm happy about every useful tip, so thank you in advance!
/r/django
https://redd.it/1mka58y
Reddit
From the django community on Reddit
Explore this post and more from the django community
What are the benefits of UV's build backend?
Has anyone started using the newly stabilized build backend from UV? I'm seeing little discussion as to the benefits of it and am curious as to whether anyone has had tangible experiences with it.
/r/Python
https://redd.it/1mkkoj8
Has anyone started using the newly stabilized build backend from UV? I'm seeing little discussion as to the benefits of it and am curious as to whether anyone has had tangible experiences with it.
/r/Python
https://redd.it/1mkkoj8
Reddit
From the Python community on Reddit
Explore this post and more from the Python community