So what's the deal with Python on the Web?

I noticed the other day that Python seems to be the third most popular programming language on GitHub, if this is anything to go by. I know that Python is not primarily thought of as a web language, but still, it is pretty handy for websites and apps, especially thanks to things like Django, Flask, Bottle and so on. But I don’t see it being talked about much, here or elsewhere. There are some great questions on Stack Overflow with few or no answers, too. So does anyone know what’s up with Python on the Web? Am I just looking in the wrong places?

It’s actually really popular and I see it mentioned a lot, so I think it’s just a case of looking in the wrong places or not noticing references to it. Reddit, Disqus, Pinterest, etc. all are (were?) written in Python.

I don’t use Python, but I’m pretty sure Django is by far the most popular framework. But I have used SimpleHTTPServer on my RaspberryPi before and it was just a few lines of code and worked for whatever it was I needed it for (I honestly don’t remember what it was :smiley:).

1 Like

I tried it out of interest and had a few problems getting “Hello world” to work but got there in the end. From memory it was quite hard finding examples on how to get it working.

Again from memory it is not recommended to be run directly but though a framework or similar?
A quick search turns up: “The Web Server Gateway Interface, or WSGI for short”.

Anyway it was about a year ago when I tried it and I can not remember the full details - oh yes I remember I created a graph as well using a plugin/class or whatever :grinning:

1 Like

I installed Python 4 years ago when it was needed so I could install the Mozilla Addon SDK.
I tried a “Hello Word” and intended to get back to it, but got busy writing JavaScript for several Firefox extensions, RL got in the way, and I haven’t been back to it since.

So I’m far from being able to give an authoritative opinion. A single “Hello World” doesn’t even make me a Python newbie.

Python calls itself a “High Level” language. i.e. more “programmer friendly”

My extremely brief exposure gave me the impression that it’s strengths are more in doing “system level” tasks, IO, data crunching, etc. than in outputting HTML

I tend to feel that way about Perl too, I guess mainly because years ago I wrote some Perl for a few CGI tasks.
But like PHP, Perl is a “Scripting Language” and it can do some amazing things with HTML, just that I feel more comfortable with PHP for that.

So my “feelings” don’t jive with the “labels”,

IMHO just about any language can be used to do just about anything. But the trick is to know where their strengths are and weigh in how more trouble it would be to get them to do the things they are weaker at doing.

Similar to using WordPress instead of a more powerful CMS like Drupal. You can throw all kinds of plugins at it, but after adding more and more of them there comes a point where you begin to wonder if using WordPress was the best choice.

4 Likes

I totally agree with your comments @Mittineague and it is unlikely I will go any further with it.

It seems Python is the new “in” language and people are using it for everything. I know somebody who wrote his thesis using it!

1 Like

A ton of colleges started using it as their core language about 5-6yrs ago or so.

I wouldn’t say it’s “in”, but it’s well designed, powerful, and easy to use. It’s been around for a while and it’s unlikely to go anywhere soon.

2 Likes

The only time I’ve used Python was for KDE’s solution to Access, Kexi. Their plugins and advanced queries required writing them in Python.

It was interesting, pretty well documented API for interacting with Kexi, but apart from that I’ve had little need to dive deeper into the language.

And like you, @ralphm, I spent a considerable amount of time googling and figuring things out. Sometimes it took a while to get the exact terms needed to produce the result I needed, but most of the time the python website itself answered a few of my questions (especially around syntax and language keywords)

1 Like


https://xkcd.com/353/

4 Likes

FWIW here’s some info from GitHub itself. Python isn’t third there, nor has it been for years, but it’s an interestingly high ranked language either way. To be honest, Java surprises me too. I guess I don’t think of GH as the places where those language’s projects go to live, lol.

Here is an interesting conversation about it:

https://www.reddit.com/r/learnpython/comments/1lhbr2/why_did_python_become_so_popular_in_the_last_4/

My brief research just now seemed to indicate that Python is wayyyyy more popular than I was aware of, so that’s interesting. Definitely an interesting topic @ralphm. Should we be doing more on the forums / articles / SPP with Python related topics? Or is it leaning more away from web in the majority of its use, and so we stay clear mostly?

2 Likes

Java has a long history of being open source, even if the company who owns it is a greedy corporate monster. Most projects have moved from Google Code and SourceForge to Github over the last couple years.

GitHut.info is also a cool place to get GitHub language info.

1 Like

I’ve used Python since 1991 (v0.9.0). System administration & monitoring, command line, astrogeology, telecommunications, and more. It’s like most other languages; you either like it or you don’t. I didn’t at first. There is a ton of code in use in the wild. It’s not new, nor the “in thing.” Those past years ago. It’s just a very useful language for many projects.

There are many “Python talk” type sites out there, some mentioned. Instead of listing stuff I would recommend you start with the Python Weekly [dot com] newsletter. You’ll discover talks, podcasts, blogs, tools, conferences, and more.

Good luck.

2 Likes

Lots of Python articles get proposed to SitePoint, but they don’t get nearly the readership that something like JS would. So I’ve been looking around at what’s hot with Python, who uses it, what kind of things are being talked about … and I’m still a bit in the dark over where things stand with Python. I’m not sure why people would turn to Python on the Web unless it’s just because that’s the language they are already used to. Or maybe there’s some special virtue to Python that I’m missing, which would draw people away from PHP, Node, Rails and so on?

Yep, good suggestion. I joined that recently, and it’s very useful, as are

http://importpython.com/newsletter/
http://newsletter.pythontips.com/

1 Like

Part of the reason Python has so much traction on e.g. github is that it’s usefulness has a very wide spread. It’s long been favored in scientific analysis, big data, geospatial tooling, and higher mathematics. Most of these areas of traction are due to the fact that Python has an immense number of mature libraries available. And over the past 10 years, Python has been a significant player on the web mostly due to the popularity of Django. So it’s a language that spans across many domains, not just web (which is quite different from PHP and Javascript, which are pretty much web-only).

I came to Python via Django and fell head over heels in love with both - it’s hard to imagine using anything else to build on the web at this point.

5 Likes

Wow, that’s interesting to hear. Thanks for joining the discussion. :slight_smile:

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.