:: Re: [DNG] Preferred automounter beh…
Top Page
Delete this message
Reply to this message
Author: aitor_czr
Date:  
To: Steve Litt, dng
Subject: Re: [DNG] Preferred automounter behavior?
Hi Steve,

On 12/25/2015 09:03 PM, Steve Litt <slitt@???> wrote:
>> Hi,
>> >
>> >One persistently tempting question about using Python, or any other
>> >interpreted programming language, is why they are used?
> I can answer that, always assuming speed and hardware interfacing
> aren't an issue:
>
> 1) For performing the same task, Python's always much easier to
>     program. And easier algorithms mean less dark corners for bugs to
>     hide.

>
> 2) Python (and Perl, Ruby, Lua and Scheme) is already debugged and
>     secure. Without C's pointers, overflowable arrays, manual garbage
>     collection, matching of mallocs and frees, and other security
>     problems, one can write a secure Python program with a lot less
>     security knowledge.

>
> 3) Assuming your Python program doesn't import a bunch of seldom-used
>     Python libraries, deployment is*much*  easier. Deploying a
>     well-written Python program is a mere wget. I once had a distro with
>     a bad or missing youtube-dl package. Because it's just a python
>     script, I copied it from the Internet onto my path, and bang, I had
>     youtube-dl. Try that with any C program.

>
> 4) Python has several ways of invoking a binary program, so if one part
>     of the project absolutely requires C, that part can be a tiny C
>     program that's easy and secure to program, and have it called by
>     Python.

>
> 5) A lot of the functionality of a C program could be imitated by
>     existing POSIX tools like cat, grep, awk, sed, cut, sort, gzip, and
>     the like. Running these programs first, in order to cut way down on
>     the data transfer, can allow the stdout to go into a Python program
>     that can keep up with the process.

>
>
> Truth be told, if I were a business' manager of software development,
> any time somebody wanted to write something in C I'd make him/her
> justify doing so by proving it would be disadvantageous to write it in
> Python (or Perl or Ruby or Lua or Scheme or whatever).
>
>
> SteveT


In my opinion, python is a good tool for that. Easy to understand, easy
to translate..., and a complement for C language, because they share
libraries. You can also run shell scripts via os.system(). Add to this
tools like PyGtk and PyQt for graphical interfaces.

Go ahead :)

    Aitor.