Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #109537 > unrolled thread

Re: Everything good about Python except GUI IDE?

Started byMichael Torrie <torriem@gmail.com>
First post2016-06-05 22:01 -0600
Last post2016-06-05 22:01 -0600
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Everything good about Python except GUI IDE? Michael Torrie <torriem@gmail.com> - 2016-06-05 22:01 -0600

#109537 — Re: Everything good about Python except GUI IDE?

FromMichael Torrie <torriem@gmail.com>
Date2016-06-05 22:01 -0600
SubjectRe: Everything good about Python except GUI IDE?
Message-ID<mailman.19.1465185694.2306.python-list@python.org>
On 03/02/2016 03:36 PM, Marko Rauhamaa wrote:
> Requirements for what I have in mind:
> 
>  1. It would have to be and feel like real Python.
> 
>  2. External commands should be available as callable Python functions.
> 
>  3. Functions/commands should return streams. (Generators, maybe?)
> 
>  4. Pipelines should have an intuitive syntax (but still be valid
>     Python).
> 
> Requirements 3 and 4 apply to regular Python code as well.

I've thought about this before and even tried my hand at creating a nice
library for doing this sort of thing with Python.  Generators seem like
a natural analog for the shell pipes. However there is one big problem
with them and that is they can only deal with one stream at a time.
Whereas in shell programming there are 2 streams that you can use and
connect simultaneously.  For example I can simultaneously pipe standard
out from a program to another command whilst piping standard error to
another.  I never figured out a way to emulate this idea of piping
multiple streams.

In the end I decided that Python's superior text processing facilities
eliminated 90% of the reason to use pipes.  And for the other 10%,
generators worked extremely well and efficiently.

http://www.dabeaz.com/generators/Generators.pdf

When I was doing a lot of shell scripting in Python I wrote my own
wrapper routine to launch programs and obtain stdout and stderr, which I
could process with generator filters and that worked fairly elegantly
for many things.  Kind of a half-way approach but it worked well.

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web