Python Forum
Why Python for Network Programming
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why Python for Network Programming
#1
Hey folks. I’ve been spending some time playing around with Python with a focus on network programmability, automation and SDN.

But the one thing I can’t understand is why Python?

I have experience with NodeJS and Ruby. But everywhere you look, Python is predominantly used for network automation and SDN.

Why not NodeJS or Ruby or any other programming language for that matter? Is it just preference or am I missing something?
Reply
#2
I think it has to do with the implementation + language features + history.
CPython has a very thin wrapper around sockets, which allows low-level access.

In addition, we have all important High-Level networking libraries since the beginning of Twisted (2002).
For example, node.js was released 2009. Python was released 1990 and Ruby 1995.
The first version of Python existed even before the web was accessible.
Threads were introduced 1996 in the Linux-Kernel.
So Python even existed before PThreads were introduced in the Linux-Kernel.

Since Python 3.5 we have also asyncio support for io.


I think the history, the syntax and libraries made Python indispensable for networking.
Python is also known as glue language. By the way, the ruby-syntax is not far away from Pythons syntax.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Assistance with Python Network script cscecela 2 4,722 Feb-24-2019, 01:23 AM
Last Post: searching1
  A virtual network to use with python to learn about networking with python? marienbad 0 2,329 Feb-11-2019, 09:20 PM
Last Post: marienbad
  Python Socket programming with packets sourabhjaiswal92 1 4,089 Sep-18-2018, 06:24 AM
Last Post: martingever
  Batch network configuration/ verification task using Python anonyfate 1 3,112 Jul-03-2018, 04:30 AM
Last Post: buran
  How to direct python to use a specific network adapter? ormesome 9 10,780 Nov-08-2017, 06:42 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020