Sorry but I could understand if you had to maintain a legacy code base.
Sorry but I could understand if you had to maintain a legacy code base.
You can write middleware in anything that's executable via a terminal window.
On Fedora, Python comes pre-installed with first class support for
Python virtual environments. It is ready for use straight out of the
box. No guessing package names, no installation, just dive in and go.
Look:
[fedora]$ python3 -m venv env
[fedora]$ . env/bin/activate
(env) [fedora]$ python ...
Note the python3 ...EDIT: wow, 4 downvotes for stating a fact that Fedora developers themselves are shouting from rooftoops. The Python3 hate is strong today.
python --version
(note not python3) This recommendation will be periodically reviewed over
the next few years, and updated when the core development
team judges it appropriate.
So it's likely that at some point between here and 2020, or in 2020 at worst, the recommendation will change.IMHO Python 3 has now reached a level of maturity and backward-compatibility where it can safely take over as system python. It's now shipped by Fedora, which means the next RHEL will also ship it. Updating old scripts should mostly be a matter of grepping and shebanging from python to python2, and there is now no point in procrastinating further with this move.
#!/usr/bin/env python3
This works on all modern Linux distributions today.I was one of them until the last couple of months. I think moving to 3 now makes sense, and it's pain-free in my experience.
In 2016 I hadn't made the move yet. And as recently as a couple of months ago, sometimes py2 was still the choice (for instance, Amazon Lambda didn't support 3 yet).
Sure, lots of Enterprise apps use Python 2 because that was what they could build with.
I'm a Python developer and I don't know anyone who doesn't use Python 3 by default.
I understand this is purely anecdotal, but it seems outlandish to say that Python devs mostly use Python 2.
Then again, if your language is completely representable with US-ASCII, you might not have experienced the pain caused by having to unit test pretty much all string operations in your code.
Then I guess it's a good thing I didn't say that. I said the majority of the ones I know use it.
[1]: https://semaphoreci.com/blog/2016/11/11/python-versions-used...
The idea is that I'd like to write little to make little things work with IFTTT. Py2 is just enough to do a lot while keeping things casual and of fun. Py3 is too serious to me and shell script just awful...
Happy hacking.