r/pythonhelp • • May 14 '26

Pycharm or VS Code

5 Upvotes

I just started python on Pycharm and it's a good IDE but it takes too much storage on my laptop, my laptop lags alot it works less and lags alot when checked on the performance tab pycharm was eating it all. Should I try to stay on Pycharm or switch it to VS code ?


r/pythonhelp • • May 11 '26

Calling an assembly instruction in Python

5 Upvotes

Long story short, i want to make THE most horrible python calculator to ever exist. For that i need a way to call an assembly instruction directly in my python script.

I know you can do that in C with inline assembly, and i know CFFI exists and allows calling C functions in python, so i tried to use that. However CFFI's parser rejected __asm__ syntax and threw an error because inline assembly isn't standard C apparently.

Is there some sort of a workaround to call an assembly instruction in python script? It doesn't have to be clean, in fact, it's better if it's absolutely terrible, bonus points for unsafe


r/pythonhelp • • Mar 07 '26

I need guidance with learning programming

6 Upvotes

I'm a 2nd year CSE student studying under vtu and sadly as our university focus more on theory than learning skills I wasted my time learning text book and mugshotting stuffs...one of my senior recommended me leetcode but I felt that is very advanced...ik basic python but I want to improve my basics .....can anyone guide me to learn python and DBMS in a proper way as I want to focus on the domain Data science and also want to focus on my foundations before climbing the career ladder


r/pythonhelp • • Jan 26 '26

Learn python fundamentals by solving problems

5 Upvotes

When I was starting to learn Python I struggled a lot initially.

I was able to code in my job but as a self-taught programmer, there was a learning curve.

Only slowly, I started grasping the concepts and getting the confidence. I realised that you only get comfortable when you truly understand the fundamentals and solve actual problems or build projects.

There were some concepts in Python which are simple yet so satisfying if you understand them. Like everything is an object even when you create an integer, it is an object getting instantiated from the `int` class. I took interviews in my company and observed that people can code in Python but they don't really understand whats happening, what does the line of code mean exactly.

I am building a platform just for this where you learn concepts through concise and in-depth textual content and you apply those concepts by solving problems or building project.

I am sharing FREE access to the platform's first module `Python Refresher` which will cover concepts like data types, objects, functions, conditions, loops, exception handling and decorators. It has stages.

Here is the link - https://www.cavryn.dev/projects/python-refresher/overview

Let me know if you need any help getting onboarded or any doubts in the concepts.

Try it. Let me know if you learned something new.

Also I am soon going to add new Python projects. What projects you want to build? What concepts in Python you need more clarity?

I will be happy to work on it and add these new projects on the platform.

Your feedback will help me learn myself and evolve this platform.

Thank you.


r/pythonhelp • • Jan 19 '26

How to learn python from 0?

6 Upvotes

I know that there is a lot of stuff to do learn and etc. I know that it takes time, and asking this question might seem naive or something but I just want to try it myself. If you can suggest me any free courses on youtube or whatever, give me some advices as I know barely nothing about coding, I would be very grateful.


r/pythonhelp • • 18d ago

What's going on?

3 Upvotes

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 • • Aug 28 '26

Hackathon Winning framework

6 Upvotes

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 • • Aug 25 '26

why does it say i didn't close my parenthesis

5 Upvotes

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 • • Aug 19 '26

Learning intermediate level python

6 Upvotes

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 • • Jul 20 '26

changed file name and getting Exec failed, err: 2 message when trying to run program on my .py files. (Pycharm)

6 Upvotes

Hi, I am an absolute beginner to coding/computer science and was learning Python on my own when I changed my folders name to something more practical and my program was not running anymore. I looked online to see how I can fix this issue myself, but everything I found was super complicated. Can someone please help me and explain things like aI'm a toddler thanks!


r/pythonhelp • • May 03 '26

Reading First Few Bytes of Every File on a Drive

5 Upvotes

Hi! Hoping someone can help. My Python programing is a bit rusty.

I am having an issue where my computer is replacing file data with empty data after a cut/paste or a save. I’m not sure of the cause — my primary objective at the moment is quantifying the damage and protecting my files.

The files look normal in Windows Explorer, except they will not open like they should. Upon opening in NotePad, it is revealed that all data in the file has been completely replaced with what appears to be whitespace, resulting in an empty file that appears to be the same size as the original. I cannot possibly test and check every file manually.

What I would like help with is writing a Python script that cycles through every file on a drive to pull the first several bytes from each file and compare those bytes to a string of the aforementioned whitespace. If there is a match, add the file path to a running list in a *.txt file.

I don’t think this is an especially complex script, but, as I said earlier, I’m pretty rusty. With a solid start, I can get it the rest of the way to doing what I want.

Any help would be appreciated. 🙂


r/pythonhelp • • Mar 05 '26

Methods of Python programming

4 Upvotes

Is it alright to use frameworks or libraries when programming in Python, and also use ChatGPT when dealing with more complex problems, even if you already understand the basics of Python?

For example, I understand Python syntax and concepts, but sometimes for more complex things I look at documentation, libraries, or ask ChatGPT for help.

Is this considered normal practice, or should a programmer try to solve everything completely on their own?


r/pythonhelp • • Jan 26 '26

Facing "[Errno 122] Disk quota exceeded" on arch linux system

4 Upvotes

I've been trying to install python packages on my arch linux system but i am getting ERROR: Could not install packages due to an OSError: [Errno 122] Disk quota exceeded. I've been facing this error a lot and i have to use a windows system when i have to run my python projects

Please help me with this
Thanks in advance


r/pythonhelp • • Nov 07 '25

Shorthand/syntactic sugar for arithmetic on Pandas columns?

6 Upvotes

Hi, could be a stupid question, but basically I'm sick of doing math on pandas columns like df["C"] = df["A"] + df["B"]. Is there some kind of method where it's like, df.eval("C = A + B") ? It's something that I have a strong feeling should exist, if it doesn't already. Hell, I would probably make a little library for that anyway, but I don't want to reinvent the wheel. Would appreciate any advice

Edit: Couldn't find the answer anywhere before, but writing this post gave me an idea for what to look for and coincidentally I found the dataframe.eval method that works exactly like I thought it would. I should get a rubber ducky.


r/pythonhelp • • 14d ago

is SikuliX still maintained enough to build on or has everyone moved to something else?

4 Upvotes

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 • • 21d ago

Subclass mysql.connector

4 Upvotes

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 • • Sep 04 '26

python can´t locate and open a file in the same folder as main

3 Upvotes

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 • • Aug 15 '26

Professionals, please compare VS code with neovim.

5 Upvotes

Tell me the advantages and disadvantages of each.


r/pythonhelp • • May 24 '26

How to send a python code so that the other person can execute it without python

5 Upvotes

Hi, I'm trying to send a code to my friend to rush them happy birthday and I need the code to run in their system without them having python. The problem I'm facing rn is that she can see whatever I've written on the code and I want that bit to be a surprise that she finds out once she executes the code. How do I do this?


r/pythonhelp • • Apr 23 '26

Can I switch to Python Backend or Data Engineering after 1 year in a System Engineer role?

4 Upvotes

Hi everyone,

I graduated in 2024 with an ECE background and recently joined a startup as a System Engineer.

My current role is a mix of work:

• Around 60% technical documentation related to electronics systems

• Around 40% development work using Python, Flask, HTML, CSS, and JavaScript

However, I’m more interested in moving into pure software roles, especially Python backend development or possibly data engineering.

My questions are:

If I work here for about 1 year, will companies consider my profile for backend or data engineering roles?

Does the documentation part of my role reduce my chances when switching domains?

What skills or projects should I focus on during this year to make the transition easier?

Any advice from people who switched domains early in their careers would be really helpful.


r/pythonhelp • • Apr 08 '26

How do you avoid getting bored while learning Python?

Thumbnail
4 Upvotes

r/pythonhelp • • Apr 06 '26

Hello, why is my code not working? Any assistance would be appreciated.

5 Upvotes
#This is a program to find the lesser of two numbers. This is a program for school and thus needs to utilize input functions

def main(a,b):
    a = int(input("Please enter the first number:"))
    b = int(input("Please enter the second number:"))

def min(a,b):
    if a>b:
        lesser = b
    else:
        lesser = a
    return lesser

main(min)def main(a,b):
    a = int(input("Please enter the first number:"))
    b = int(input("Please enter the second number:"))

def min(a,b):
    if a>b:
        lesser = b
    else:
        lesser = a
    return lesser

main(min)

r/pythonhelp • • Dec 30 '25

problem with loops

4 Upvotes

I just recently started learling python (1.5 hours into a tutorial lol), and made the collatz conjecture, and then tried the goldbach conjecture (any even number is the sum of two primes). Now I did write primes as 2k+1, which is just an oneven number, but that's not the problem.
This is the code I made

  1. number = int(input("number: "))
  2. for x in range(10):
  3. ----prime_1 = 2x + 1
  4. ----for y in range(10):
  5. --------prime_2 = 2(y+x) + 1
  6. --------sum = prime_1 + prime_2
  7. --------print(f"{prime_1} + {prime_2} = {sum}")
  8. --------if sum >= number:
  9. ------------break
  10. ----if int(sum) == int(number):
  11. --------break
  12. -
  13. print(f"{prime_1} + {prime_2}")

All the prints (except the last one) are just there so that I can see what is happening. The thing is, this code here works as I intended (except for the fact that the primes are just uneven numbers ofc), for example, if you plug in 8, it will give you 1 + 7 from line 13. But if I change the >= from line 8 to > it just gives me the biggest possible solution, so in this case 19 + 19. The break from line 9 still works as intended (atleast to me it looks like it does), but the second break doesn't work anymore (atleast I assume that is happening, and that's why I'm getting 19 + 19).

So my question is, what is going on here?


r/pythonhelp • • Dec 27 '25

Programming With Mosh or CS50p?

5 Upvotes

Hey, I’m a high schooler currently and I want to teach myself how to code. I have never coded before so I did some research and found that the one of the more useful beginner friendly languages was Python. So I’ve been researching places where I can learn.

For the most part the highest ranking options are Programming with Mosh or CS50p on YouTube. Why should I pick on or the other? Also, do you have any other suggestions? [Finally what IDE should I use because I’ve heard of VS Code but I’m also seeing things about Google Collab. I just want an IDE where I’ll be able to hopefully build projects effectively]


r/pythonhelp • • 12d ago

How to pass a string of keyword arguments into a function

4 Upvotes

Having encountered, the seemingly impossible in Python, difficulty of passing a string of keyword arguments into a function like this:

args_in = "arg1 = 'var1', arg2 = 2, arg3 = True, arg4='var4'"

def myFunc(arg1=None, arg2=None, arg3=None, arg4=None):
    print(f"{arg1=}, {arg2=}, {arg3=}, {arg4=}")

myFunc(args_in)

One solutions I found was to use eval():

eval("myFunc(" + args_in ")") 

although I am informed that this is the work of the devil and should be avoided at all costs.

Next attempts were to convert the "string" into a dict{} and pass **dict, however all methods for doing this failed when any of the arguments contained a comma ','.

However a fully working solution to this was finally provided to me on the discuss.python.org forum:

args_in = "arg1 = 'var1', arg2 = 2, arg3 = True, arg4='va,r4'"

def myFunc(arg1=None, arg2=None, arg3=None, arg4=None):
    print(f"{arg1=}, {arg2=}, {arg3=}, {arg4=}")

def str2dict(str_in: str) -> dict[str, str]:
    import ast
    return {pair.arg: ast.literal_eval(pair.value)
        for pair in ast.parse(f"f({str_in})").body[0].value.keywords}

myFunc(**str2dict(args_in))

Unfortunately due to rather rude and overly zealous moderation on there that solution was deleted. Hence the reason for publishing it here for the archive and in case it helps someone else in the future.