Python as a scripting language. Alternative to bash script?

John Nagle nagle at animats.com
Mon Jun 28 13:57:45 EDT 2010


On 6/28/2010 7:58 AM, Benjamin Kaplan wrote:
> How does a program return anything other than an exit code?

    Ah, yes, the second biggest design mistake in UNIX.

    Programs have "argv" and "argc", plus environment variables,
going in.  So, going in, there are essentially subroutine parameters.
But all that comes back is an exit code. They should have had
something similar coming back, with arguments to "exit()" returning
the results.  Then the "many small intercommunicating programs"
concept would have worked much better.

    C was like that once.  In the 1970s, all you could return was
an "int" or a "float".  But that got fixed.

				John Nagle



More information about the Python-list mailing list