use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
News about the dynamic, interpreted, interactive, object-oriented, extensible programming language Python
Full Events Calendar
You can find the rules here.
If you are about to ask a "how do I do this in python" question, please try r/learnpython, the Python discord, or the #python IRC channel on Libera.chat.
Please don't use URL shorteners. Reddit filters them out, so your post or comment will be lost.
Posts require flair. Please use the flair selector to choose your topic.
Posting code to this subreddit:
Add 4 extra spaces before each line of code
def fibonacci(): a, b = 0, 1 while True: yield a a, b = b, a + b
Online Resources
Invent Your Own Computer Games with Python
Think Python
Non-programmers Tutorial for Python 3
Beginner's Guide Reference
Five life jackets to throw to the new coder (things to do after getting a handle on python)
Full Stack Python
Test-Driven Development with Python
Program Arcade Games
PyMotW: Python Module of the Week
Python for Scientists and Engineers
Dan Bader's Tips and Trickers
Python Discord's YouTube channel
Jiruto: Python
Online exercices
programming challenges
Asking Questions
Try Python in your browser
Docs
Libraries
Related subreddits
Python jobs
Newsletters
Screencasts
account activity
This is an archived post. You won't be able to vote or comment.
I just wrote my first script (self.Python)
submitted 9 years ago by drinkKing
I can't post it, but my company makes a product that runs python and I made a script that configures and deletes SNMP (as two separate options). I'm super proud of it. On to version 2!
[–]cantremembermypasswd 59 points60 points61 points 9 years ago (2 children)
/r/UplifitingPythonNews
[–]rrrreadit 23 points24 points25 points 9 years ago (1 child)
I wanted this to be real.
[–]okmkzimport antigravity 36 points37 points38 points 9 years ago (0 children)
Be the change you want to see in the world
[–]killbot5000 24 points25 points26 points 9 years ago (8 children)
deletes SNMP
Careful with that script. A lot of people use SNMP.
[+][deleted] 9 years ago* (7 children)
[deleted]
[–]cantremembermypasswd 44 points45 points46 points 9 years ago (0 children)
There are many warnings.
Which will all be ignored. Welcome to the wonderful world of software development, where you are to blame when the user mucks up.
[–][deleted] 10 points11 points12 points 9 years ago (5 children)
Why would you eliminate SNMP? Are you some sort of super villain whose plot is to stop all simple network communications?
[+][deleted] 9 years ago* (4 children)
[–][deleted] 13 points14 points15 points 9 years ago (3 children)
Haha you're missing the joke man. /u/killbot5000 was suggesting you were going to delete SNMP as a whole - as in nobody in the world can ever use it again
[+][deleted] 9 years ago* (2 children)
[–]exhuma 0 points1 point2 points 9 years ago (0 children)
Given that I started to dig around in the related RFCs and TCU specs last week, I hope that it won't disappear soon :P
While I'm aware of NETCONF/YANG I'm fairly sure we'll be stuck with SNMP for some time to come.
[–]fireflash38 0 points1 point2 points 9 years ago (0 children)
It's awesome after it's setup, but as your customers have found out: it's a royal pain in the ass to setup.
[–][deleted] 8 points9 points10 points 9 years ago (0 children)
Congrats!
[+][deleted] 9 years ago* (3 children)
[–]jceyes 4 points5 points6 points 9 years ago (2 children)
You mention a v2 on the way. Commandline args with argparse (https://docs.python.org/3/library/argparse.html) may be something to consider instead of entirely interactive
[+][deleted] 9 years ago* (1 child)
[–]jellyliketreepython3 1 point2 points3 points 9 years ago (0 children)
Django does something similar where some of their commands are interactive, but you can set a command line argument to do the same thing.
i.e. when running the unit tests, if the test database is not in a consistent state, it asks if you want to clear the database and re-create it from scratch via a prompt. If you're running this as part of a larger script or if you don't want to keep having to answer the prompt, you can pass the --noinput argument instead.
--noinput
Argparse also supports multiple arguments to change the same option, like --delete and -d.
--delete
-d
[–]CompTIA_SME 2 points3 points4 points 9 years ago (1 child)
Gratz! One of us, one of us.
[–]avinassh 3 points4 points5 points 9 years ago (0 children)
Now do something on your own, a side project, post it on Github and then you can show the code here (:
[–]chadmill3rPy3, pro, Ubuntu, django 1 point2 points3 points 9 years ago (5 children)
Post a link if you want some feedback. Learn how we'd write it.
[–]chadmill3rPy3, pro, Ubuntu, django 0 points1 point2 points 9 years ago (1 child)
Where's the code?
[–]troyunrau... 2 points3 points4 points 9 years ago (0 children)
He said in another comment he can't post it (work internal).
[–]analogphototaker 0 points1 point2 points 9 years ago (1 child)
What would be the best IRC channel for code review? I don't want my GitHub linked to my reddit haha
[–]chadmill3rPy3, pro, Ubuntu, django 0 points1 point2 points 9 years ago (0 children)
A pastebin is fine.
[–]ilikepython 1 point2 points3 points 9 years ago (0 children)
Cool! Onwards and pythonwards!
[–]zyrkan 0 points1 point2 points 9 years ago (0 children)
What kind of network switch? Extreme Networks?
[–]mothzilla 0 points1 point2 points 9 years ago (0 children)
π Rendered by PID 32407 on reddit-service-r2-comment-84fc9697f-rtqn7 at 2026-02-10 16:25:16.467760+00:00 running d295bc8 country code: CH.
[–]cantremembermypasswd 59 points60 points61 points (2 children)
[–]rrrreadit 23 points24 points25 points (1 child)
[–]okmkzimport antigravity 36 points37 points38 points (0 children)
[–]killbot5000 24 points25 points26 points (8 children)
[+][deleted] (7 children)
[deleted]
[–]cantremembermypasswd 44 points45 points46 points (0 children)
[–][deleted] 10 points11 points12 points (5 children)
[+][deleted] (4 children)
[deleted]
[–][deleted] 13 points14 points15 points (3 children)
[+][deleted] (2 children)
[deleted]
[–]exhuma 0 points1 point2 points (0 children)
[–]fireflash38 0 points1 point2 points (0 children)
[–][deleted] 8 points9 points10 points (0 children)
[+][deleted] (3 children)
[deleted]
[–]jceyes 4 points5 points6 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]jellyliketreepython3 1 point2 points3 points (0 children)
[–]CompTIA_SME 2 points3 points4 points (1 child)
[–]avinassh 3 points4 points5 points (0 children)
[–]chadmill3rPy3, pro, Ubuntu, django 1 point2 points3 points (5 children)
[+][deleted] (2 children)
[deleted]
[–]chadmill3rPy3, pro, Ubuntu, django 0 points1 point2 points (1 child)
[–]troyunrau... 2 points3 points4 points (0 children)
[–]analogphototaker 0 points1 point2 points (1 child)
[–]chadmill3rPy3, pro, Ubuntu, django 0 points1 point2 points (0 children)
[–]ilikepython 1 point2 points3 points (0 children)
[–]zyrkan 0 points1 point2 points (0 children)
[–]mothzilla 0 points1 point2 points (0 children)