r/Python • u/debordian • Aug 15 '23
r/Python • u/tom333444 • Feb 10 '22
Discussion Wrote a simple python script for some random guy, he thought it was a virus
Is this reasonable? i sent it to him as an EXE to make it more convenient and without even downloading and testing it for virsuses he just accused me of sending him a virus?
I'm actually pretty confused as i took the time out of my day to figure out how to turn the script into an EXE just to make it more comfortable for him only to then get accused and blocked.
I even sent him the .py file and he thought os.system("pause") was going to take control of his computer or something i guess lol wtf.
at least i learned how to make python exes.
r/Python • u/llSourcell • Feb 25 '17
How to Predict Stock Prices Easily - Intro to Deep Learning
r/Python • u/santiagobasulto • Dec 29 '12
Simple script to download TPB torrent files
r/Python • u/Ornery_Watch_2769 • Mar 26 '21
Tutorial How to extract text from image in Python
r/Python • u/Medium-Law-3022 • Jul 21 '24
Resource Iโm thrilled to announce the release of my new Django package
๐ Introducing Django Data Seed: Your Solution for Database Test Data! ๐Iโm thrilled to announce the release of my new Django package, Django Data Seed! ๐
This tool is designed to make the lives of developers easier by simplifying the process of populating databases with test data. Whether youโre working on a small project or a large-scale application, Django Data Seed helps you quickly generate realistic data for your development and testing needs.
With Django Data Seed, you can efficiently manage and populate your database with just a single command. It's perfect for ensuring that your applications are rigorously tested and ready for production.
I invite you to check out Django Data Seed on PyPI and GitHub:
๐ PyPI: https://pypi.org/project/django-data-seed/
๐ GitHub: https://github.com/rohith-baggam/django-data-seed
๐ Linkedin : https://www.linkedin.com/in/rohith-raj-baggam/
Thank you for your support, and I look forward to seeing how Django Data Seed can help streamline your development process! Keep an eye on the PyPI package for exciting new features in upcoming versions.
r/Python • u/ruskeeblue • Mar 15 '12
Python code to exploit Windows RDP - Yes , its out in the wild!
r/Python • u/jwink3101 • Feb 03 '19
[meta] Can we have a moratorium on all GUI posts?
I tend to be a downvote-and-move-on kind of person with posts that Iโm tired of, but the insane number of GUI posts as of late are getting ridiculous. Especially since they are all asking the same basic thing.
I think the mods should declare a 1 or 2 month moratorium where all generic โwhat GUI should I useโ posts be removed.
Thoughts? Am I just being a crotchety old man? Or do others agree this is too much? (Not mutually exclusive)
Thanks
P.S.
What are your thoughts on the best GUI for python?
r/Python • u/algorhythm85 • Dec 01 '25
Showcase Introducing Typhon: statically-typed, compiled Python
Typhon: Python You Can Ship
Write Python. Ship Binaries. No Interpreter Required.
Fellow Pythonistas: This is an ambitious experiment in making Python more deployable. We're not trying to replace Python - we're trying to extend what it can do. Your feedback is crucial. What would make this useful for you?
TL;DR
Typhon is a statically-typed, compiled superset of Python that produces standalone native binaries. Built in Rust with LLVM. Currently proof-of-concept stage (lexer/parser/AST complete, working on type inference and code generation). Looking for contributors and feedback!
Repository: https://github.com/typhon-dev/typhon
The Problem
Python is amazing for writing code, but deployment is painful:
End users need Python installed
Dependency management is a nightmare
"Just pip install" loses 90% of potential users
Type hints are suggestions, not guarantees
PyInstaller bundles are... temperamental
What if Python could compile to native binaries like Go or Rust?
What My Project Does
Typhon is a compiler that turns Python code into standalone native executables. At its core, it:
Takes Python 3.x source code as input
Enforces static type checking at compile-time
Produces standalone binary executables
Requires no Python interpreter on the target machine
Unlike tools like PyInstaller that bundle Python with your code, Typhon actually compiles Python to machine code using LLVM, similar to how Rust or Go works. This means smaller binaries, better performance, and no dependency on having Python installed.
Typhon is Python, reimagined for native compilation:
Target Audience
Typhon is designed specifically for:
Python developers who need to distribute applications to end users without requiring Python installation
Teams building CLI tools that need to run across different environments without dependency issues
Application developers who love Python's syntax but need the distribution model of compiled languages
Performance-critical applications where startup time and memory usage matter
Embedded systems developers who want Python's expressiveness in resource-constrained environments
DevOps engineers seeking to simplify deployment pipelines by eliminating runtime dependencies
Typhon isn't aimed at replacing Python for data science, scripting, or rapid prototyping. It's for when you've built something in Python that you now need to ship as a reliable, standalone application.
Core Features
โจ No Interpreter Required Compile Python to standalone executables. One binary, no dependencies, runs anywhere.
๐ Static Type System Type hints are enforced at compile time. No more mypy as an optional afterthought.
๐ Convention Enforcement Best practices become compiler errors:
ALL_CAPSfor constants (required)_privatefor internal APIs (enforced)Type annotations everywhere
๐ Python 3 Compatible Full Python 3 syntax support. Write the Python you know.
โก Native Performance LLVM backend with modern memory management (reference counting + cycle detection).
๐ ๏ธ LSP Support Code completion, go-to-definition, and error highlighting built-in.
Current Status: Proof of Concept
Be honest: this is EARLY. We have:
โ Working
Lexer & Parser (full Python 3.8+ syntax)
Abstract Syntax Tree (AST)
LLVM integration (type mapping, IR translation)
Memory management (reference counting, cycle detection)
Basic LSP (completion, navigation, diagnostics)
Type system foundation
๐ In Progress
Type inference engine
Symbol table and name resolution
Static analysis framework
๐ซ Not Started (The Hard Parts)
Code generation โ This is the big one
Runtime system (exceptions, concurrency)
Standard library
FFI for C/Python interop
Package manager
Optimization passes
Translation: We can parse Python and understand its structure, but we can't compile it to working binaries yet. The architecture is solid, the foundation is there, but the heavy lifting remains.
Roadmap
Phase 1: Core Compiler (Current)
Complete type inference
Basic code generation
Minimal runtime
Proof-of-concept stdlib
Phase 2: Usability
Exception handling
I/O and filesystem
Better error messages
Debugger support
Phase 3: Ecosystem
Package management
C/Python FFI
Comprehensive stdlib
Performance optimization
Phase 4: Production
Async/await
Concurrency primitives
Full stdlib compatibility
Production tooling
See ROADMAP.md for gory details.
Why This Matters (The Vision)
Rust-based Python tooling has proven the concept:
Ruff: 100x faster linting/formatting
uv: 10-100x faster package management
RustPython: Entire Python interpreter in Rust
Typhon asks: why stop at tooling? Why not compile Python itself?
Use Cases:
CLI tools without "install Python first"
Desktop apps that are actually distributable
Microservices without Docker for a simple script
Embedded systems where Python doesn't fit
Anywhere type safety and performance matter
Inspiration & Thanks
Standing on the shoulders of giants:
Ruff - Showed Python tooling could be 100x faster
uv - Proved Python infrastructure could be instant
RustPython - Pioneered Python in Rust
Want to Help?
๐ฆ Rust Developers
You know systems programming and LLVM? We need you.
Code generation (the big challenge)
Runtime implementation
Memory optimization
Standard library in Rust
๐ Python Developers
You know what Python should do? We need you.
Language design feedback
Standard library API design
Test cases and examples
Documentation
๐ฏ Everyone Else
โญ Star the repo
๐ Try it and break it (when ready)
๐ฌ Share feedback and use cases
๐ข Spread the word
This is an experiment. It might fail. But if it works, it could change how we deploy Python.
FAQ
Q: Is this a replacement for CPython? A: No. Typhon is for compiled applications. CPython remains king for scripting, data science, and dynamic use cases.
Q: Will existing Python libraries work? A: Eventually, through FFI. Not yet. This is a greenfield implementation.
Q: Why Rust? A: Memory safety, performance, modern tooling, and the success of Ruff/uv/RustPython.
Q: Can I use this in production? A: Not yet. Not even close. This is proof-of-concept.
Q: When will it be ready? A: No promises. Follow the repo for updates.
Q: Can Python really be compiled? A: We're about to find out! (But seriously, yes - with trade-offs.)
Links
Repository: https://github.com/typhon-dev/typhon
License: MIT
Contributing: CONTRIBUTING.md
Roadmap: ROADMAP.md
Building in public. Join the experiment.
r/Python • u/ricocotam • Jan 05 '19
I hate notebooks, change my mind
I juste hate them. I never liked using them (I've been forced to for several weeks). It just produces bad code, bad habits and unmaintainnable scripts/code.
r/Python • u/BeamMeUpBiscotti • Sep 29 '25
Discussion Why Today's Python Developers are Embracing Type Hints
Python is incredibly popular in fields where speedy experimentation and iteration are critical, and where developers are coming from a broad range of STEM backgrounds, not necessarily computer science. But as projects grow from experiments to production systems, that same flexibility can become a liability.
Saying "if you wanted a production system you should have used a different language" or "just rewrite it in _" is missing the point - Python's optional typing features allow projects to gradually adopt type annotations & type checking as they mature, improving reliability without requiring an expensive/disruptive rewrite.
Blog post: https://pyrefly.org/blog/why-typed-python/
r/Python • u/schrobbert_ • May 27 '25
Discussion Proposal: A finally-like block for if/elif chains (w/Github Issue)
I just opened a feature proposal on the CPython issue tracker and wanted to hear what others think.
Issue link: https://github.com/python/cpython/issues/134807
The idea:
Introduce a block (similar to `finally`) that runs only if one of the `if` or `elif` conditions matched. It would look something like this:
if cond1:
# do A
elif cond2:
# do B
finally:
# do C (only runs if cond1 or cond2 matched)
# do D (Basically always runs, if conditions where met or not)Currently, you'd need to use a separate flag like `matched = True` to accomplish this:
matched = False
if cond1:
# do A
matched = True
elif cond2:
# do B
matched = True
if matched:
# do C (only runs if cond1 or cond2 matched)
# do D (Basically always runs, if conditions where met or not)I'm not sure if `finally` is the right keyword for this, but it gets the concept across.
Would something like this make sense in Python? Could it work? Curious what others think!
r/Python • u/Independent_Order934 • Dec 31 '25
Showcase Built a web-based SQLite explorer with cross-table filtering with SQLAlchemy - feedback welcome!
TL;DR: Upload a SQLite database, explore multiple tables simultaneously with real-time cross-table filtering, and share results via URL. Built because I kept running into this problem at work.
Since uploading your database to an unknown party isnโt exactly recommended, a playground mode is included so you can explore the features without risking your data!
Try it out:
What My Project Does
๐ Dynamic exploration - View multiple tables at once with real-time filtering
๐ Shareable state - Your entire dashboard (tables, filters) lives in the URL - just copy/paste to share
๐จ Zero setup - Upload your .db file and start exploring immediately
๐ Cross-table filtering - Apply filters that automatically work across table relationships
Target Audience
People who want to automatically explore their data dynamically according to the filters. This can actually be useful in lots of applications!
Comparison
I am very curious to know other similar projects. I could not find online, but I guess lots of projects involve such a filter query builder in their core!
Please give your feedback!
As this is my first open source project, I'm really interested in hearing feedback, suggestions, or use cases I haven't thought of!
I am also happy to hear about other projects doing kind of the same thing. I could not find any online!
P.S. Heavily helped by AI. Tbh Claude code is amazing when guided well!
r/Python • u/[deleted] • Sep 27 '09
From their expression on hearing the word Python, I knew I was not going to crack this interview. Iโm not going to mention Python in any future interview.
sayamindu.randomink.orgr/Python • u/redditaddicttt • Aug 27 '09
Any online exam for Python?
I want to add Python to my CV, but I don't think any institution in India conducts any python exams. Any credible online exam?
r/Python • u/g4n0n • Aug 24 '09
map(' '.join, zip(['Work it', 'Make it', 'Do it', 'Makes us',],['Harder', 'Better', 'Faster', 'Stronger']))
songsincodedb.comr/Python • u/[deleted] • Dec 06 '13
Why I hate virtualenv and pip
r/Python • u/DriveThat • Dec 19 '17
My actually brother just looked up from his macbook and said this to me.
r/Python • u/[deleted] • May 07 '23
Discussion What is the most used keyword or function in all of programming?
This thought has been stuck with me for a while now.
r/Python • u/mdipierro • Mar 18 '11
On web2py with tornado, cherrypy, paste, mako templates, the regular python shell, and propaganda (7min video)
r/Python • u/ado6789 • Aug 25 '17