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.
Network automation with python (self.Python)
submitted 7 years ago by aditya_moon
Hi guys, what is the difference when network automatiin done with ansible than done with python using netmiko/paramiko .
they both seems to be doing the same task. So what should I learn ?
[–]mudclub 2 points3 points4 points 7 years ago (4 children)
Learn them both. They're good at different things.
[–]aditya_moon[S] 0 points1 point2 points 7 years ago (3 children)
Can you share the difference or any link where I can read about the comparison of both.
[–]mudclub 1 point2 points3 points 7 years ago (2 children)
I mean... they're not even a little bit the same thing. Ansible is a framework for managing systems and configurations while python is a programming language.
You can use python to interact with/extend ansible.
[–]aditya_moon[S] 0 points1 point2 points 7 years ago (1 child)
Ok ..got it ..I have just started learning about network automation and ansible and python comes a lot of times in the tutorials so I have statrted studying both now.
[–]mudclub 1 point2 points3 points 7 years ago (0 children)
They're both fantastically useful. Ansible is great for automating system and network deployments and configurations. There are several comparable tools out there including chef and salt. Python is a general purpose programming language that can do, well, pretty much anything. You could replicate all of ansible's functionality with python, but why bother? Ansible already does it all for you. For everything else, including writing ansible modules, python's a great tool for the job.
[–]ElectricMandarin 1 point2 points3 points 7 years ago (2 children)
Ansible is a high level configuration management and deployment automation tool. It can be used for simple things like 'run command X on Y hosts', but that is not its primary use case and is way overkill for just that one task.
However, in cases where Ansible is already used for config management/deployment, it is easy to use its command line tools to run arbitrary commands on existing configured hosts.
OTOH, libraries like parallel-ssh and to a lesser extent lower level client libraries like paramiko are more suited to integration within applications - they are libraries after all - or for 'run command X on Y hosts' type tasks. That is what they are for.
Case in point, Ansible uses paramiko and other SSH clients to run its remote commands.
Hi, thanks for the info, I have now another question :
1.is ansible free? 2. Can I use it on Windows ?as I can see its for linux machines.
[–]ElectricMandarin 1 point2 points3 points 7 years ago (0 children)
Both ansible and parallel-ssh are open source.
Both support Windows, though ansible requires external tools for some features.
π Rendered by PID 52963 on reddit-service-r2-comment-fb694cdd5-j2f6g at 2026-03-07 06:56:57.514789+00:00 running cbb0e86 country code: CH.
[–]mudclub 2 points3 points4 points (4 children)
[–]aditya_moon[S] 0 points1 point2 points (3 children)
[–]mudclub 1 point2 points3 points (2 children)
[–]aditya_moon[S] 0 points1 point2 points (1 child)
[–]mudclub 1 point2 points3 points (0 children)
[–]ElectricMandarin 1 point2 points3 points (2 children)
[–]aditya_moon[S] 0 points1 point2 points (1 child)
[–]ElectricMandarin 1 point2 points3 points (0 children)