[lug] Python: Unable to catch subprocess error
Davide Del Vento
davide.del.vento at gmail.com
Sat Mar 10 06:18:50 MST 2018
On Fri, Mar 9, 2018 at 8:01 PM, Jed S. Baer <blug at jbaer.cotse.net> wrote:
> On Fri, 9 Mar 2018 19:34:38 -0700
> Davide Del Vento wrote:
>
> > With python the easiest is looking at the source. See
> > /usr/lib/python2.7/subprocess.py
> > on line 1327 (or previous in the stack trace) and see.
>
> Heh. While I appreciate the suggestion, I'd really like to think that
> such would be necessary only in cases of really bizarre constructs. Is it
> really not possible to grok the basics from the docs? That's a part of
> the thought process behind the scenes. I learned Fortran and Macro-11 by
> reading the DEC manuals, and C by reading K&R. (Just 3 examples.) If I'm
> going to run into stuff like this all the time in Python, I'll just go
> back to Perl (or try something else).
>
I had the same attitude as you when I started with python and only got
frustration with its "weird way". When I started looking at the source code
like I'm recommending you to (because someone recommended it to me!) I
started to truly grasp and understand things and especially whys.
It must be said that some say the source code itself is the true
documentation in python, and it's usually true because it can be written
(and often is) very expressively.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20180310/42b2d33f/attachment.html>
More information about the LUG
mailing list