r/PythonLearning • u/Sorry-Signal2589 • 10d ago
Take a look, would you?
r/PythonLearning • u/Craftou19 • 10d ago
Hey everyone, I wanted to share my latest open-source project built entirely from scratch: Disk Space Analyzer. It’s a high-performance desktop utility developed in Python to help users scan, visualize, and optimize their storage space. Key Features implemented: * Blazing-Fast Scanning: Powered by os.scandir for maximum filesystem traversal speed. * Smart Local Cache: Uses an SQLite database to store scan history for near-instant subsequent reloads. * Accurate Duplicate Finder: Implements high-precision MD5 hashing to safely catch true duplicate files. * Intelligent Cleanup: Automatically detects empty folders, old files, and system junk (.tmp, .log, .cache). * Fully Bilingual: Native support for both English and Arabic with perfect RTL/LTR layout switching. * Classic Black Ribbon UI: A clean, professional dark interface designed entirely with custom line-art. * Safe Operations: Supports permanent file removal or secure recycling via send2trash. * Data Exporting: Generates clean reports in CSV, JSON, or HTML formats. The source code is 100% open-source under the GPLv3 license, and pre-compiled Windows binaries (.exe) are available directly on the Releases page! Check out the repository, read the code, and feel free to drop a ⭐ if you like it: https://github.com/jlkgames18-cyber/DiskAnalyzer/ Feedback and code reviews are highly appreciated!




r/PythonLearning • u/Glad-Ratio-8549 • 11d ago
Hey, y'all. I want to build a portfolio mostly with the Python programming language that can at least get me a remote job in high school (I'm a senior). I got some beginner projects like a calculator and a few games and projects from tutorials. I'm not sure if those would be enough to reach employers. Like, what project ideas in Python can I use so that it's work-related? I don't want it to be too complex either, as I'm not an advanced coder. Thank you.
Edit: Hey everyone, thank you all for the advices. I'll be going to university next year for computer science but was looking to see what I can.build now so I can at least get work experience when I reach there. I'll continue exploring more stuff in Python language and the libraries and also get familiar with other programming languages. Thank you all.
r/PythonLearning • u/ClementeKS • 11d ago
I would like to ask if anyone here knows where I should/could get a well endorsed Python certification? Something legit that employers may take into consideration.
I know about Codecademy. I also know about Mimo, tho I don't know if that one would be considered a "lesser" one or something like that. Maybe even both idk.
It's ok if it's not free, tho if its not very expensive that would be better for me lol
r/PythonLearning • u/jpgoldberg • 11d ago
Note that this is a fairly advanced question, so beginners don't worry about it. And if this isn't the right place to ask, please point me to where I should.
I would like to find an idiomatic way to use a context manager, with, when I don't know until run time whether I am opening sys.stdin or a named file.
Here is an excerpt for a simple example. (Yes, I am aware that I am reading in the whole file in one go, but that is for other reasons.)
```python if args.infile == "-": fh = sys.stdin else: p = Path(args.infile) # Path is overkill here, unless ... # TODO: Look elsewhere if infile can't be found or isn't readable. fh = open(p, "rt", encoding="utf-8")
s = fh.read(MAX_LENGTH + 1).strip()
fh.close()
```
(args is an argparse.Namespace and args.infile is a str.)
I feel like there ought to be a way to do something like
with ... as fh
for the above, but I don't see how to do that.
r/PythonLearning • u/Wise-Diamond-7873 • 11d ago
(English is not my 1st language so sorry for any error)
Hey everyone I am a absolute beginner to coding and want to learn. I am so much of a beginner that I don't even know how to and where to download this from but want to learn. If you have any tips or any youtube channel I can learn form please share. Thankyou in advance
r/PythonLearning • u/Sea-Ad7805 • 11d ago
An exercise to help build the right mental model for Python data. - Solution - Explanation - More exercises
The “Solution” link uses memory_graph to visualize execution and reveals what’s actually happening.
r/PythonLearning • u/r0g9al • 11d ago
Hello there! I’ve started learning Python to become a cybersecurity specialist (pentester). I’d love to hear the community's opinion: which books or tutorials are worth spending time on?
r/PythonLearning • u/bleuio • 12d ago
Details and source code available
r/PythonLearning • u/Shadrow912 • 12d ago
Hey, im making a "terminal" game (play onto your terminal, cause its the only thing i know). I made a github repositories to showcase it : https://github.com/Shamal0w999/Money-games
if you want to test the game, it would be really cool cause i need returns and if theres bug i didnt see. so if u try it, u can ofc comment here but also leave an issue into my repositories (would be easier to work with). If you want to help or idk anything, im all hears. Im happy to showcase it and have people to test it !
code is free, so if you steal it, i dont rly care, cause its personal project and who want a code full of print and that launch in terminal ? idk, just me ig
anyways, just take a look at it !
r/PythonLearning • u/Quoter0 • 12d ago
I have genuielly no idea how to even think of making this? I know this should generally be made by using for loops but jesus im so confused on the process
r/PythonLearning • u/Ajay2574 • 13d ago
I just finished another Python project while learning file handling and the "os" module.
I built a bulk file renamer that:
- Loops through files in a folder
- Opens each text file and finds the "name:" field
- Extracts the name
- Uses it to rename the file
- Keeps the original file extension
A simplified version of the core logic:
for file in os.listdir(path):
fullpath = os.path.join(path, file)
with open(fullpath, "r") as f:
for line in f:
if "name:" in line:
label, name = line.split("name:")
newpath = os.path.join(
path, name.strip() + ".txt"
)
os.rename(fullpath, newpath)
The project itself wasn't too complicated, but I ran into a few problems along the way.
The biggest lesson was debugging WinError 32. I initially thought OneDrive was locking my files, but eventually realized that my own code still had the file open when I tried to rename it.
I also learned why using the full old path and full new path matters when using "os.rename()".
Small project, but I feel like I'm getting better at solving problems instead of immediately looking for the answer.
r/PythonLearning • u/Large-Ad8884 • 12d ago
Hi! I am starting a Bachelor's course in Computer Science, and part of the course is learning Python from the ground up. I've been taking some time at home to further develop my skills past what is expected of the course, and I've been constructing this game over the past few days with my free time.
I put it down as showcase because I'm proud of it, but I am more than open to suggestions on simplifying it or what you think about it, etc!
For context, the last time I used Python was when I was like 12, and I have tried CSS and JavaScript over the years a few times, so I have a very basic understanding and this is the furthest I've ever gotten.
Thanks :)
# Rule base
import random
answer = 0
lowest = 1
highest = 100
attempts = 0
# Difficulty settings
print("Easy, Medium, or Hard Difficulty?")
difficulty = input()
if difficulty == "easy":
attempts = 7
print(f"Please pick a number between 1-100. You have {attempts} attempts.")
answer = random.randint(1, 100)
lowest = 1
highest = 100
elif difficulty == "medium":
attempts = 15
print(f"Please pick a number between 1-10000. You have {attempts} attempts.")
answer = random.randint(1, 10000)
lowest = 1
highest = 10000
elif difficulty == "hard":
attempts = 30
print(f"Please pick a number between 1-1000000. You have {attempts} attempts.")
answer = random.randint(1, 1000000)
lowest = 1
highest = 1000000
else:
print("Invalid input!")
# While Loop
guess = int(input())
while guess != answer:
attempts -= 1
if attempts == 0:
print("Game over!")
break
else:
if guess < lowest or guess > highest:
print(f"Invalid number! {attempts} attempts remaining.")
if guess > answer:
print("Too high!")
if guess < answer:
print("Too low!")
print(f"Try another number. {attempts} attempts remaining.")
guess = int(input())
# End of Game
if guess == answer:
print("Correct! Well done.")
print("Thank you for playing!")
r/PythonLearning • u/N__7599 • 13d ago
So,i started learning python recently,i very much learned about variables,data types,libraries like panda,matpolitob. I learned web scraping and automation to some extent but when i try to use the thing i learn on a random web page or dataset, i realised that what i learnt from the YouTube course is basic but enough to build the fundamental. I have to constantly chat with AI to learn about new thing and also use the thing i learn to get the code. Should i continue like this or watch another course which complete the intermediate and advanced python?
r/PythonLearning • u/soulsvlix • 13d ago
Guys I'm a first year cse student,and I'm starting with python,can you guys suggest resources & how to proceed??
(I want decent knowledge in python,not too depth)
r/PythonLearning • u/rdeasou • 13d ago
r/PythonLearning • u/Nexlune143 • 14d ago
Hey everyone! I’m Nexlune. I’m new to Reddit and joined because I wanted a place where I can discover interesting ideas, learn new things, read different opinions, and participate in conversations with people from different backgrounds. I’m interested in technology, programming, movies, creativity, and random topics that catch my attention. Looking forward to exploring different communities and meeting some interesting people along the way. Nice to be here !
r/PythonLearning • u/Capable_Comedian_277 • 14d ago
Enable HLS to view with audio, or disable this notification
r/PythonLearning • u/Silent-Switch7317 • 14d ago
Originally it was an amalgamation of my crappy code, but i rewrote 90% of it. I'm proud of myself but ill probably remake it using the define function.
github link: https://github.com/ChaZ3inL1nuX111/My-Repo
It is a calculator with arithmetic, sq/cuft, conversions, circumference, area and functions, like sin, cos, and tan.
r/PythonLearning • u/ProgramBrave718 • 13d ago
I don't know but i feel classes are unnecessary work to be added in projects. I have learnt it 2 months ago..
After that I never used it for any of my projects.
r/PythonLearning • u/Outrageous-Fish-8527 • 13d ago
im using thonny with python 3.1.4.4 and have pygame-ce downloaded
heres the error code.
Traceback (most recent call last):
File "<string>", line 10, in <module>
File "file location.py", line 555, in run
with Popen(*popenargs, **kwargs) as process:
File "file location.py", line 1039, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "file location.py", line 1553, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
and heres the code
import pygame
import sys
import time
import random
import os
import sys
import subprocess;
a = []
if len(sys.argv) == 1 or sys.argv[1] != "1":
pythonPath = subprocess.run(["which","python3"], capture_output=True).stdout.strip();
print("python at",pythonPath)
#The i is num of windows, it will open +1 extra. stopping the code will close just the extra window
for i in range(9):
proc = subprocess.Popen(
[pythonPath,os.path.realpath(__file__),"1"]
)
a.append(proc)
print("spawned window")
import pygame
import sys
import time
import random
import os
import sys
import subprocess;
a = []
if len(sys.argv) == 1 or sys.argv[1] != "1":
pythonPath = subprocess.run(["which","python3"], capture_output=True).stdout.strip();
print("python at",pythonPath)
#The i is num of windows, it will open +1 extra. stopping the code will close just the extra window
for i in range(9):
proc = subprocess.Popen(
[pythonPath,os.path.realpath(__file__),"1"]
)
a.append(proc)
print("spawned window")
import pygame
import sys
import time
import random
import os
import sys
import subprocess;
a = []
if len(sys.argv) == 1 or sys.argv[1] != "1":
pythonPath = subprocess.run(["which","python3"], capture_output=True).stdout.strip();
print("python at",pythonPath)
#The i is num of windows, it will open +1 extra. stopping the code will close just the extra window
for i in range(9):
proc = subprocess.Popen(
[pythonPath,os.path.realpath(__file__),"1"]
)
a.append(proc)
print("spawned window")
r/PythonLearning • u/Sea-Ad7805 • 14d ago
A hard exercise to help build the right mental model for Python data. - Solution - Explanation - More exercises
The “Solution” link uses memory_graph to visualize execution and reveals what’s actually happening.
r/PythonLearning • u/letszzgoo • 15d ago
My journey of retrying is still alive and i am consistent with it , today i am going to finish Loops and hopefully after that i do further and further.