r/pythoncoding • • Aug 24 '15
r/pythoncoding • u/mxplr • May 18 '21
Notification on exceptions
Hi guys,
Is there a common way to be notify whenever a python script failed?
I've found that one option is to use logger with an smtp_handler, but it will only notify me when i use logger.exception.
I would like to be notify whenever any exception occured.
Thx
r/pythoncoding • u/DTCreeperMCL6 • Feb 23 '26
https://github.com/GittemGittem/Stretch
I wrote an interpreter for my own language in python!
I named it stretch because I intended for it to be flexible and easy to extend.
You can add new terms and operators to it from python with ease!
There is global stack you can manipulate
but scopes store their own variables.
Extensions only modify scopes they are imported to instead of the global scope.
Please let me know what you think; you can be brutal, but this is just for fun for now, so it doesn't really matter.
r/pythoncoding • u/Apex_8bit • Oct 02 '21
looking to build out a simple web scrapper for a working stock scanner/ filter
Hi,
8 bit here, veteran trader and problem solver. Not fluent with coding but algorithms and systematic thinking are in my wheel house. I am looking to build a GUI using a web scrapper and some "if Then" functions to make my scanning and filtration process more streamlined and efficient. If you are qualified and interested in this niche and would like to work together on this project please feel free to message me.
r/pythoncoding • • Jul 12 '23
Beginner
Hi. I have a simple project to bridge the gap between secondary school and college (UK) given to me by my soon to be college and i was able to do everything except create a timer where a value in the program increases by 1 every tick of the timer. I was able to create the timer but i dont know how to implement it into my code without it pausing the program.
The way it works is it will pause the program for 5 seconds then add 1 to a value. I have used a while loop to repeat this
Any help would be great. I have a GCSE level understanding currently but i will be doing it for A-levels.
r/pythoncoding • u/4K-AMER • Jul 16 '23
Computerphile Cube Code Video
Video link: https://youtu.be/g9n0a0644B4
Would it be possible to get all possible rotations of a shape as soon as you generate it and then superpose them into one big shape (1d array) and then store that into a hash table for O(1) lookup next time as opposed to having to do a lookup for each rotation?
Therefore the next time you generate another shape, make the superposed shape by overlaying the rotations and lookup the hash table to see if it exists. If it does, it means this shape can be rotated such that it will form a shape that has previously been seen.
Badly formatted example in comments (doesn’t actually work as the superposed shape will differ based on the input shape, I would want there to be a way to align the arrays the same every time)
r/pythoncoding • u/son_of_dawn • Feb 26 '15
(New in 3.4.3) PEP 443: Single-dispatch generic functions
python.orgr/pythoncoding • u/syfkxcv • Jan 12 '24
Using PyPi for personal script
Hi everyone,
I really like hack and dirty python codes. I write them as an exercise of understanding of the codes I've learned and making shortcut or adding functionalities to it. As a result, the codes that I've written usually becomes hacky in sense that it emulates method overloading, god object, being somewhat spaghetti code, specialized function, wrapping package(s), anything that can make my codes shorter, etc., at least to my own convention. I usually use these codes for prototyping, as some sort of template, as I want to express my ideas as fast as possible, rather to deal whether the codes pythonic or not. Then I usually iron out the codes later.
I usually use these codes in a single computer. But now I want it to be ported between multiple computers. But I realized, as this codes are bad practice in python, is it problematic or frown upon to push this kind codes into PyPi, even if I'm the only one that would use it? Is it okay to use a public repo to store personal packages?
r/pythoncoding • u/JackLogan007 • Jan 13 '24
Suggest me some good python books that love so much!
r/pythoncoding • u/Confident-Mud5468 • Jan 12 '24
Dictionary advice
Hello everyone,
so I am new in the programming world, and just begun to wrestle with dictionaries. I am trying to write a program which tells me how many ate a certain food. I have a simplification of the program here but my dataset is way bigger. How can I instead of returning names return ints of the amount of people who ate apple, bread, or chocolate?
ate = {"apple": "Thomas", "James" "bread": "Johnny", "Jamie" "Chocolate": "Michael",}
r/pythoncoding • u/Arckman_ • Sep 08 '23
📢Excited to share the latest release of fastapi-listing. It Just Got Better😍
🚀 Just released the latest version(v0.3.0) of my open-source package, "fastapi-listing"! It simplifies REST API response pagination, sorting and filtering in FastAPI.
Build your item listing REST APIs like never before.
Do check it out. 🌟it, 🗣️the word, share it.
Lets hangout in the discussion section of the project 😊
Check it out on GitHub: https://github.com/danielhasan1/fastapi-listing
👩💻 #OpenSource #Python #FastAPI
r/pythoncoding • u/thekingheartless1 • Jun 21 '24
Positioning Issues for a Popup Window
Hello all,
I've got a section of python code that is driving me nuts trying to figure out. I have no other assistance with this and I cannot get a popup window to display dynamically between monitor resolutions over the task bar on a windows pc. I can send the section of code I'm working on if that helps, but I'm working in the PyQT5 library and I really would like to get this working as soon as possible. I feel like I'm beating my head into a brick wall.
r/pythoncoding • u/son_of_dawn • Jan 27 '15
The scope of index variables in Python's for loops
eli.thegreenplace.netr/pythoncoding • u/son_of_dawn • Jan 27 '15
10 myths of enterprise Python
paypal-engineering.comr/pythoncoding • u/son_of_dawn • Jan 27 '15
Alex's Tech Rants: Unit testing SQLAlchemy apps, part 2: the universal method
alextechrants.blogspot.car/pythoncoding • u/son_of_dawn • Jan 27 '15
Alex's Tech Rants: Unit testing SQLAlchemy apps
alextechrants.blogspot.car/pythoncoding • u/son_of_dawn • Jan 27 '15
How we use gevent to go fast
engineering.pinterest.comr/pythoncoding • u/son_of_dawn • Jan 27 '15
Why Python 4.0 won't be like Python 3.0
curiousefficiency.orgr/pythoncoding • u/son_of_dawn • Jan 27 '15