Everything good about Python except GUI IDE?

Steven D'Aprano steve at pearwood.info
Tue Mar 1 20:51:42 EST 2016


On Wed, 2 Mar 2016 05:06 am, Marko Rauhamaa wrote:

> Steven D'Aprano <steve at pearwood.info>:
> 
>> On Sun, 28 Feb 2016 11:38 pm, BartC wrote:
>>> It's the GUI users who are the Neanderthals, having to effectively
>>> point at things with sticks. Or have to physically move that rock
>>> themselves (ie. drag a file to a wastebasket).
>>
>> I haven't physically moved an icon to the wastebasket for years. I
>> point at the icon, right-click, and tell it "move yourself to the
>> trash".
> 
> Do you find that interface convenient? Do you often find yourself
> clickety-clicking around to perform bulk file operations?

Sometimes. Especially with media files which display a thumbnail, it is far
more convenient to be able to look at the icon and recognise the file than
to try to guess from the filename "x73nfh.jpg". And having recognised the
file visually, its often easier to drag it into the folder of your choice
than to type "mv x7<tab> dir<tab>" in a separate window.

But not always. It's much easier to do "mv foo* dir<tab>". Horses for
courses.


>> Language is pretty important. But when you need to drive a nail into a
>> piece of wood, would you rather hit the nail with a hammer, or explain
>> to the hammer the precise direction and magnitude of force you would
>> like it to apply when it impacts the nails?
> 
> I don't know. My everyday file manipulation needs are so diverse that I
> couldn't imagine how a GUI would make my life easier.

*shrug* 

Then perhaps they're not as diverse as you think.


> What I'm thinking is, could Python turn into a serious competitor to
> bash? The standard shell suffers greatly from sloppy quoting, and many
> of the age-old list-processing idioms are more awkward than cute.

No. Python's syntax is too wordy to make a good shell. You need brackets and
quote marks for everything:

# bash
ls foo/bar

# Python
ls("foo/bar")

iPython is usable, by adding non-standard syntax to its REPL. I don't think
it's a serious contender as replacement for bash, but you could give it a
try. But the standard Python REPL? No.


> A python shell would need a well-thought-out default import plus a way
> to string together external commands. Maybe JSON or similar could be the
> standard I/O framing format (instead of SPC-separated fields and
> LF-separated records).

You really want to be typing JSON by hand instead of space-separated
fields/arguments?

# Python using JSON
ls('["-l", "foo/bar", "spam/ham"]')

# bash
ls -l foo/bar spam/ham

Bugger that for a game of soldiers.




-- 
Steven




More information about the Python-list mailing list