Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
Nippashish
Nov 2, 2005

Let me see you dance!

QuarkJets posted:

I think 'zip' is actually pretty simple to understand if you've ever seen or used a zipper before

zip is intuitive if you know what it means, but if you'd never encountered it before you might not know what it did just from the name. My argument is that _ is the same.

Adbot
ADBOT LOVES YOU

Nippashish
Nov 2, 2005

Let me see you dance!
Its almost like clarity of different conventions depends on which conventions you're used to seeing and using yourself.

Nah, there's definitely a universal objective answer.

Nippashish
Nov 2, 2005

Let me see you dance!

Thermopyle posted:

In other news I've been spending some time recently converting a bunch of bash scripts to python because gently caress bash.

I came across the plumbum library that's pretty neat for easing this type of work.

This is neat. I've used sh for this in the past, but plumbum looks a bit more featureful. Does it handle piping properly (i.e. hooking stdin/stdout of the processes together at the OS level) or does it shuffle everything through python? I've used a few shell replacement libraries that do the later and it can be a real show stopper if you need to move a large amount of data around.

A bit of fuckery is worth it though, just to avoid bash's insane string quoting rules.

Nippashish fucked around with this message at 12:48 on Feb 5, 2017

Nippashish
Nov 2, 2005

Let me see you dance!
The first problem is storing configuration in ini files. There's no good way to make non-hierarchical configuration not be annoying. I usually end up writing a dict-like class that lets me use thing.element instead of thing['element'] and writing all my configuration in config.py files.

Nippashish
Nov 2, 2005

Let me see you dance!
Any reason you can't use ffmpeg or avconv?

Nippashish
Nov 2, 2005

Let me see you dance!
The code examples probably aren't useful. People don't read megathred OPs to learn the language. They're also a really big thing to put before the main content. They'd be better in a second post if you must have them.

Adbot
ADBOT LOVES YOU

Nippashish
Nov 2, 2005

Let me see you dance!
The internet is very vocal about python 3 but there is a lot of python 2 development still going on. PyPI download statistics from ~1 year ago (apparently you can't get them anymore) puts python 2.7 somewhere in the ballpark of 10x more popular than all versions of python 3 combined. Pycharm's developer survey from last year is a bit better, but still comes out 60/40 in favor of 2.

  • Locked thread