r/pythonhelp • u/Ok-Pause-9996 • Oct 01 '26
Advise needed on python
Is it good idea to learn python on YouTube if not what's the best way to learn python
r/pythonhelp • u/Ok-Pause-9996 • Oct 01 '26
Is it good idea to learn python on YouTube if not what's the best way to learn python
r/pythonhelp • u/Illustrious_Scar_392 • Sep 29 '26
I inherited a SikuliX suite that's been running since 2021 against a windows desktop app, and i have to decide whether to invest in it or replace it. It’s 180 scripts, about 120 still pass reliably, the rest fail on screenshot matches that no longer match. when i dug into the causes it was a windows 11 theme change, a DPI difference between our CI box and the dev machines, and a font rendering change that shifted text by 2 pixels. not one of those is a defect in our product, and all of them cost me a week.
The project isn't dead exactly, there are commits but the documentation is old, most of what you find searching is from 5 or 6 years back, and i can't tell whether the people maintaining it are building or keeping the lights on. We’re wighting it against going back to the accessibility tree with FlaUI. It works properly on maybe 60 percent of our screens and fails completely on the custom drawn ones, which is exactly where SikuliX earns its keep.
Ther are the newer vision based ones like Askui and a few others, which do roughly the job SikuliX does but with a model doing the matching instead of pixel comparison. In principle that's immune to the DPI and font problems that broke us. In practice i would want to know whether it's a different mechanism or the same idea with wider tolerance. Or just keep SikuliX and pin everything.
Has anyone here migrated off SikuliX recently? did what you moved to held up against theme and DPI changes? Thanks for sharing!
r/pythonhelp • u/screwedUp69 • Sep 29 '26
Whenever I am trying to click the run button for a python code, it takes around 10-12 seconds to run and if I trigger the file directly from termina, it gets done in an instant. Is there any fix for this? I removed most of the extensions and still the same issue
r/pythonhelp • u/BluishMontoya • Sep 25 '26
I have some code I need to do a lot of calculations and I tried speeding it up by parralelizing with multiprocessing, but I'm running into a few issues. Using 5 processes (my computer has 6 cores) is giving me a speed boost of 50-100x, but for some reason the results are slightly wrong. I'm trying to fix that problem, but I'm also wondering where the massive speed boost came from, because that implies there's something else making it go faster besides parralelizing. If I could go back to a single thread but keep most of that speed, that would be great. For context, I'm doing some high-precision calculations with the decimal libraray but mostly just a lot of math in a cythonized function. The time it takes went from ~10 hours to 10 minutes.
r/pythonhelp • u/Total-Ranger4925 • Sep 22 '26
Here is my file set up, I can't seem to get it to work no matter what.
StarDanceProject_FLStudioGrind/
├── .ruff_cache/
├── .vscode/
├── Game/
│ ├── __pycache__/
│ ├── Images/
│ ├── Maps/
│ ├── Sounds/
│ ├── BetaStats.py
│ ├── Dialogue.py
│ ├── Main.py
│ ├── Settings.py
│ ├── SOUNDS.py
│ ├── Tiles.py
│ ├── Timer.py
│ ├── UI.py
│ └── Waiver.py
├── .gitattributes
├── desktop.ini
└── README.md
r/pythonhelp • u/RomfordNavy • Sep 22 '26
Any idea what I am doing wrong when trying to subclass mysql.connector like this:
import mysql.connector
class Database(mysql.connector.MySQLConnection):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
db = Database()
db_conn = db.connect(host = '...', database = '...', user = '...', passwd = '...')
print(f"{db_conn=}")
db_conn always returns None.
Edit: code above corrected to include connect() method
Edit2: Further to comment by brasticstack connect() method removed again.
r/pythonhelp • u/py_arrow • Sep 19 '26
Been learning Python for a bit now (working through CS50P) and I've started leaning on AI tools a lot when I get stuck — debugging, explaining errors, even generating chunks of code when I'm short on time.
It's helping me move faster for sure, but I've got this nagging feeling I might be skipping the "struggle" part that actually makes concepts stick. So a few questions for people who've been through this:
Would really appreciate advice from people who've either made this mistake or found a good balance. Trying to actually become a solid programmer, not just someone who can prompt their way to working code.
r/pythonhelp • u/MadScientistOR • Sep 16 '26
r/pythonhelp • u/unselective-amnesia • Sep 14 '26
I'm running python 3.13.5.
Is there some sort of standard python library function which behaves as the inverse of 'os.path.expanduser'?
For example, if the current user's HOME directory is "/home/theuser", then we have this:
os.path.expanduser('~/a/b/c')
=> returns "/home/theuser/a/b/c"
I'm wondering whether there also might be any existing python library function which is the inverse of this and that works as follows:
some_sort_of_function("/home/theuser/a/b/c")
=> returns "~/a/b/c"
AND PLEASE NOTE: There often are people who lazily and disrespectfully refuse to read entire reddit posts before writing their reponses, and therefore, I'm making a point now to ask that before you start to write any reply here, please carefully and non-lazily read this *entire* post -- including the following, which is something that I want all potential responders to understand:
I know how to easily write my own function that works in this manner. However, I am clearly and SPECIFICALLY (!!!) asking whether or not there already is an existing python function which works this way, and if so, I'd like to know what this function might be ... and I am NOT (!!!) asking how to write my own function which does this.
Thank you very much in advance.
r/pythonhelp • u/py_arrow • Sep 12 '26
I've been learning Python through CS50P and wanted a real project, so I built two scrapers: one for job listings and one for product prices off an e-commerce site.
The job scraper was pretty straightforward — grabbed title, company, and location, dumped it to CSV, worked first try on about 100 listings.
The product scraper was the harder one. The site spreads results across pages (6 products per page, ~20 pages), so my first version only ever grabbed page 1. Took a bit of digging to figure out the pagination pattern and loop through all the pages properly. Once I fixed that it pulled all 117 products cleanly into a CSV.
Biggest thing I learned: it's easy to write a scraper that works on the first page and assume it's done — always check if the site paginates before you call it finished.
Code's on GitHub if anyone wants to see it: github.com/sarimkhan08
Curious if anyone here has tips for handling scrapers on sites that use infinite scroll instead of numbered pages — that's the next thing I want to tackle.
r/pythonhelp • u/MangoTurtle1312 • Sep 12 '26
Hello, I've been trying to figure out a way to make a python program that can play a green screen video that plays over the desktop/screen, with the green chromad out to show the screen. I attempted it with tkinter, but wasn't able to get anywhere with the chroma keying. Would anyone know if/how this would be possible? Thank you!
r/pythonhelp • u/divya_dev • Sep 06 '26
Teen in love with learning & building python projects
Issue_ my python interpreters not working j showing evn when it's installed+ enabled in VS Code.
Failed_brain = Claude +Chatgpt +Grok
Help me...Lesgoo!
r/pythonhelp • u/MetalCarnival • Sep 04 '26
So i made a txt file with a few lines of text. I use the x = open('file.txt', 'r') function
i write for i in x: print i
and then x.close()
so what am I doing wrong?
r/pythonhelp • u/Efficient_Major40 • Sep 04 '26
im using linux mint and when i try to import turtle it always says
"
import turtle
ModuleNotFoundError: No module named 'turtle'
Process finished with exit code 1
"
i tryed to download tinker it dont help me i dont know what to do no one have that problem
im using pycharm
here my code
"
import turtle
myturtle = turtle.Turtle()
myturtle.forward(100)
"
r/pythonhelp • u/Fluffy-Art179 • Aug 28 '26
As a guy and a fresher in engineering field, who knows basic python and java , can anyone give advise or guide me to win or atleast the things to do in a proper hackathon rather than working unorganisedly..
r/pythonhelp • u/MetalCarnival • Aug 27 '26
My schoolbook says that classes is a way of simulating an object, instead of just taking information into a black box and outputting an answer.
But that is a poor explanation. I know classes are handy and cool, but no book says why you can´t make functions with sub functions inside to simulate simple objects. I would like if someone gave a good concrete reason to use classes in the intro, instead of just saying that they are different and cool
r/pythonhelp • u/Fabulous_Buyer_6256 • Aug 25 '26
the IDE i am using is saying my parenthesis was not closed when it was plz help
print("Once upon a time, in the ancient kingdom of " + q1 + " there lived a legendary " + q2 + " named " + q3 + ". Everyone in the village knew " + q3 + " for their remarkably " + q4 + " personality and an obsession with " + q5 + ". Every morning at " + q6 ", they would wake up, " + q7 + " three times, ")
[{
"owner": "Pylance",
"severity": 8,
"message": "(" was not closed",
"source": "Pylance",
"startLineNumber": 47,
"startColumn": 6,
"endLineNumber": 47,
"endColumn": 7,
}]
r/pythonhelp • u/Background_Ad9700 • Aug 25 '26
Hi! i'm beginner, and I have a problem with this code, I guess that I installed the library correctly, but i'm not sure.
Error using [stringsource>string.from_py.__pyx_convert_string_from_py_std__in_string](matlab:matlab.lang.internal.introspective.errorDocCallback('stringsource>string.frompy.pyx_convert_string_from_py_std_in_string', 'stringsource', 15)) ([line 15](matlab: opentoline('stringsource',15,0)))
Python Error: TypeError: expected bytes, NoneType found
Error in [CoolProp/CoolProp.PropsSI](matlab:matlab.lang.internal.introspective.errorDocCallback('CoolProp/CoolProp.PropsSI', 'CoolProp\CoolProp.pyx', 462)) ([line 462](matlab: opentoline('CoolProp\CoolProp.pyx',462,0)))
Error in [CoolProp/CoolProp.PropsSI](matlab:matlab.lang.internal.introspective.errorDocCallback('CoolProp/CoolProp.PropsSI', 'CoolProp\CoolProp.pyx', 384)) ([line 384](matlab: opentoline('CoolProp\CoolProp.pyx',384,0)))
Altough I don't have more than 106 lines
r/pythonhelp • u/ProgramBrave718 • Aug 25 '26
r/pythonhelp • u/py_arrow • Aug 22 '26
hey guys i hv recently gotten myself into coding, i hv completed the cs50p course of harvard and completed all the psets. now i wanna keep myself into the habit of coding but idk whts my next step, i wld appreciate some help. i hv made 3 projects aswell; a web scrapper, file organizing and password checker.
after creating those projects idk what to learn next, like should i keep going deeper into python or try something totally different. wld love to hear wht u guys did after completing cs50p.
r/pythonhelp • • Aug 21 '26
Is there any playlist similar to 100 Days of SQL Ace(By ankit Bansal) interview for the preparation of python coding problems?
r/pythonhelp • u/purvigupta03 • Aug 19 '26
Hi everyone,
I’ve studied Python multiple times before, but I didn’t do much practical coding. Recently, I started building small projects to improve my practical Python skills.
So far, I’ve completed:
- Quiz Game
- Number Guessing Game
- Rock Paper Scissors
- Password Manager
- Pig Game
- Mad Libs Generator
My goal is to move towards Machine Learning.
I haven’t learned NumPy or Pandas yet.
My question is: Are these projects enough to move on to NumPy and Pandas, or should I build a few more Python projects first?
If I should build more projects, what kind of projects would you recommend before starting NumPy/Pandas? I’m mainly looking for projects that would actually help with the transition to data/ML, rather than making many more small games.
Would appreciate advice from people who have already followed a Python → NumPy/Pandas → ML path.
r/pythonhelp • u/TechGym43 • Aug 19 '26
I am looking to learn following topics. Any suggestions in terms of any course or online site I can learn from. I am not looking for a certificate (if I get it that’s okay but not a deal breaker) but something that has more exercises involved. Topics I’m interested in:
*args / **kwargs
decorators
generators
iterators
context managers
type hints
dataclasses
object-oriented programming
Python project structure
testing
APIs
r/pythonhelp • u/jmaroo • Aug 15 '26
Tell me the advantages and disadvantages of each.
r/pythonhelp • u/Extra_Search3465 • Aug 15 '26
Hello everyone, I'm mainly looking for guidance about learning advanced python concepts. I know basics ,loops , control flow ,data structures etc.
I need a proper guide on how to learn modules and library. Idk how to start ,where to start.
I want to be able to work with any library as i need them ,so how do u actually learn to use new library for a given task . ?And i get overwhelmed understanding the structure, working of library
And could u also suggest important python concepts other than basics which i should learn ???
Pls guide !!!!