Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #109537
| From | Michael Torrie <torriem@gmail.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Everything good about Python except GUI IDE? |
| Date | 2016-06-05 22:01 -0600 |
| Message-ID | <mailman.19.1465185694.2306.python-list@python.org> (permalink) |
| References | (8 earlier) <mailman.93.1456898305.20602.python-list@python.org> <878u21uw7p.fsf@elektro.pacujo.net> <nb7nki$fdk$1@dont-email.me> <87twkoa4nt.fsf@elektro.pacujo.net> <b2812bda-c3c8-e7f1-b9cf-634343e13357@gmail.com> |
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.
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Everything good about Python except GUI IDE? Michael Torrie <torriem@gmail.com> - 2016-06-05 22:01 -0600
csiph-web