Re: Pipes

2015-08-11 Thread Tim Golden
On 11/08/2015 10:58, Laura Creighton wrote: The O'Reilly book Effective Computation in Physics that Larry Hudson recommended looks really good. It also occurs to me that another way to get familiar with the scientific python world is to attend a Scientific Python conference. EuroSciPy is the en

Re: Pipes

2015-08-11 Thread Laura Creighton
The O'Reilly book Effective Computation in Physics that Larry Hudson recommended looks really good. It also occurs to me that another way to get familiar with the scientific python world is to attend a Scientific Python conference. EuroSciPy is the end of this month in Cambridge. https://www.euro

Re: Pipes

2015-08-11 Thread Laura Creighton
In a message of Mon, 10 Aug 2015 15:43:26 -0500, "E.D.G." writes: > I needed a program that could generate data regarding the locations >of the sun and the moon in the sky in response to specific times entered. >Roger developed the basic equations with some help from another researcher. >A

Re: Pipes

2015-08-10 Thread Larry Hudson via Python-list
On 08/10/2015 01:43 PM, E.D.G. wrote: [snip] It has been my experience that researchers, particularly scientists, need to have some versatile and powerful programming language available that is compatible with the Windows operating system. The language needs to make certain resources av

Re: Pipes

2015-08-10 Thread Mark Lawrence
On 10/08/2015 21:43, E.D.G. wrote: wrote in message news:d6a3dfe4-8389-463b-ac66-a93f14a91...@googlegroups.com... Just learning Python and have a question. Other important resources would be the ability to perform rapid calculations and the ability to generate plots that could display

Re: Pipes

2015-08-10 Thread E.D.G.
wrote in message news:d6a3dfe4-8389-463b-ac66-a93f14a91...@googlegroups.com... Just learning Python and have a question. Posted by E.D.G. on August 10, 2015 Roger's original post is largely a continuation of my July 25, 2015 posting regarding "Python Questions." His post does not actu

Re: Pipes

2015-08-10 Thread Mark Lawrence
On 10/08/2015 15:05, rogerh...@gmail.com wrote: On Monday, August 10, 2015 at 7:45:28 AM UTC-6, Mark Lawrence wrote: On 10/08/2015 03:55, Roger Hunter wrote: I agree that some of Python is simple but the description of subprocess is certainly not. I spent much of my working career using Fortra

Re: Pipes

2015-08-10 Thread rogerh906
On Monday, August 10, 2015 at 7:45:28 AM UTC-6, Mark Lawrence wrote: > On 10/08/2015 03:55, Roger Hunter wrote: > > I agree that some of Python is simple but the description of subprocess > > is certainly not. > > > > I spent much of my working career using Fortran and TrueBasic on mainframes. > >

Re: Pipes

2015-08-10 Thread Mark Lawrence
On 10/08/2015 03:55, Roger Hunter wrote: I agree that some of Python is simple but the description of subprocess is certainly not. I spent much of my working career using Fortran and TrueBasic on mainframes. That's good. It means that you were probably taught to read and write from left to r

Re: Pipes

2015-08-10 Thread Chris Angelico
On Mon, Aug 10, 2015 at 12:55 PM, Roger Hunter wrote: > I agree that some of Python is simple but the description of subprocess is > certainly not. That's because spawning subprocesses is a complicated thing to do - or rather, it's a simple thing to do, but with a large number of options. This is

Re: Pipes

2015-08-10 Thread Roger Hunter
I agree that some of Python is simple but the description of subprocess is certainly not. I spent much of my working career using Fortran and TrueBasic on mainframes. I'd like programming to be more like holding a discussion to the computer in English instead of Sanscrit. Roger On Sun, Aug 9, 2

Re: Pipes

2015-08-09 Thread Cameron Simpson
On 09Aug2015 20:55, Roger Hunter wrote: I agree that some of Python is simple but the description of subprocess is certainly not. It depends, to a degree. Subprocess embodies, in a fairly portable way, the mechanisms for starting an external command and connecting to it, and has a few conven

Re: Pipes

2015-08-09 Thread Cameron Simpson
On 09Aug2015 17:44, Clayton Kirkwood wrote: But there is nothing non-cryptic and orderly that I have found that lists out various modules and packages. If you know the module, it generally gives most of the information, but if you don't know the module name or function capability, you're lost.

RE: Pipes

2015-08-09 Thread Clayton Kirkwood
> -Original Message- > From: Python-list [mailto:python-list- > bounces+crk=godblessthe...@python.org] On Behalf Of Dennis Lee Bieber > Sent: Sunday, August 09, 2015 1:43 PM > To: python-list@python.org > Subject: Re: Pipes > > On Sun, 9 Aug 2015 10:5

Re: Pipes

2015-08-09 Thread Cameron Simpson
On 09Aug2015 10:55, rogerh...@gmail.com wrote: But WOW! Python is described as an easy to learn language. I don't think so! The language itself is pretty compact and expressive. You also need to gain some familarity with the standard library that comes with it. That has lots of stuff. "subpr

Re: Pipes

2015-08-09 Thread Mark Lawrence
On 09/08/2015 21:43, Dennis Lee Bieber wrote: On Sun, 9 Aug 2015 10:55:36 -0700 (PDT), rogerh...@gmail.com declaimed the following: Nevermind, I found it. Thanks for the pointer. But WOW! Python is described as an easy to learn language. I don't think so! It is... The Language Refer

Re: Pipes

2015-08-09 Thread alister
On Sun, 09 Aug 2015 10:55:36 -0700, rogerh906 wrote: > On Sunday, August 9, 2015 at 8:11:18 AM UTC-6, roge...@gmail.com wrote: >> Just learning Python and have a question. >> >> Is it possible for Python to pass information to another program (in >> Windows), wait for that program to finish and t

Re: Pipes

2015-08-09 Thread Emile van Sebille
On 8/9/2015 10:55 AM, rogerh...@gmail.com wrote: On Sunday, August 9, 2015 at 8:11:18 AM UTC-6, roge...@gmail.com wrote: Just learning Python and have a question. Is it possible for Python to pass information to another program >>(in Windows), wait for that program to finish and then resume op

Re: Pipes

2015-08-09 Thread Mark Lawrence
On 09/08/2015 18:52, Ian Kelly wrote: On Sun, Aug 9, 2015 at 11:39 AM, wrote: Where can I find out about this? It's not mentioned in my "Introduction to Python" book. The Python documentation at docs.python.org are an important resource, and in particular the subprocess module is covered at

Re: Pipes

2015-08-09 Thread rogerh906
On Sunday, August 9, 2015 at 8:11:18 AM UTC-6, roge...@gmail.com wrote: > Just learning Python and have a question. > > Is it possible for Python to pass information to another program (in > Windows), wait for that program to finish and then resume operating? > > It's called a pipe in Unix syste

Re: Pipes

2015-08-09 Thread Ian Kelly
On Sun, Aug 9, 2015 at 11:39 AM, wrote: > Where can I find out about this? It's not mentioned in my "Introduction to > Python" book. The Python documentation at docs.python.org are an important resource, and in particular the subprocess module is covered at https://docs.python.org/3/library/sub

Re: Pipes

2015-08-09 Thread rogerh906
On Sunday, August 9, 2015 at 8:11:18 AM UTC-6, roge...@gmail.com wrote: > Just learning Python and have a question. > > Is it possible for Python to pass information to another program (in > Windows), wait for that program to finish and then resume operating? > > It's called a pipe in Unix syste

Re: Pipes

2015-08-09 Thread Ian Kelly
On Sun, Aug 9, 2015 at 8:10 AM, wrote: > Just learning Python and have a question. > > Is it possible for Python to pass information to another program (in > Windows), wait for that program to finish and then resume operating? > > It's called a pipe in Unix systems. Yes, pipes can also be used

Re: pipes python cgi and gnupg

2008-01-08 Thread alisonken1
On Dec 28 2007, 7:07 pm, [EMAIL PROTECTED] wrote: > form = cgi.FieldStorage() > if not form.has_key("pass"): >print "Enter password" > > filename = "test.gpg" > pass = form.getvalue("pass").strip() > os.system("gpg --version > gpg.out") > os.system("echo %s | gpg --batch --password-fd 0 --decr

Re: pipes

2007-09-11 Thread Daniel Klein
On Mon, 10 Sep 2007 20:15:40 -0700, yagyala <[EMAIL PROTECTED]> wrote: >Hi. I'm rtying to use pipes to communicate between a python GUI and a >spawned C++ program. I prefer not to use forking because the app may >be run on windows, where forking isn't supported. Roughly what I'm >doing is: > >(r,w

Re: pipes like perl

2005-08-25 Thread Piet van Oostrum
> "infidel" <[EMAIL PROTECTED]> (i) wrote: >i> .readlines() won't return until it hits end-of-file, but the "man" >i> command waits for user input to scroll the content, like the "more" or >i> "less" commands let you view "pages" of information on a terminal. man shouldn't wait for user input

Re: pipes like perl

2005-08-25 Thread max(01)*
many thanks to all the fellows who cared to answer! bye max -- http://mail.python.org/mailman/listinfo/python-list

Re: pipes like perl

2005-08-24 Thread infidel
> but... i see it doesn't work for some commands, like "man python" (it > gets stuck on the "if" line)... .readlines() won't return until it hits end-of-file, but the "man" command waits for user input to scroll the content, like the "more" or "less" commands let you view "pages" of information on

Re: pipes like perl

2005-08-24 Thread Donn Cave
In article <[EMAIL PROTECTED]>, "max(01)*" <[EMAIL PROTECTED]> wrote: > in perl i can do this: ... > but i do not know how to do it in python, because "if *command*:" gives > syntax error. > > moreover, if i use ... > it doesn't work, since "*do_something*" and *do_something_more* are > always

Re: pipes like perl

2005-08-24 Thread Sybren Stuvel
max(01)* enlightened us with: > but i need to check the success/failure of the external command > *before* closing the file! You can't, unless you have a more intimite knowledge of the command involved. If you know, for instance, that any output on stderr means an error, you can check for just tha

Re: pipes like perl

2005-08-23 Thread max(01)*
max(01)* wrote: > infidel wrote: > >> Here's one technique I use to run an external command in a particular >> module: >> >> stdin, stdout, stderr = os.popen3(cmd) >> stdin.close() >> results = stdout.readlines() >> stdout.close() >> errors = stderr.readline

Re: pipes like perl

2005-08-23 Thread max(01)*
infidel wrote: > Here's one technique I use to run an external command in a particular > module: > > stdin, stdout, stderr = os.popen3(cmd) > stdin.close() > results = stdout.readlines() > stdout.close() > errors = stderr.readlines() > stderr.close()

Re: pipes like perl

2005-08-23 Thread max(01)*
bruno modulix wrote: > max(01)* wrote: > >>hi. > > > (snip) > > >>it doesn't work, since "*do_something*" and *do_something_more* are >>always executed (it seems like >> >>MYPIPE = os.popen("*some_system_command*", "r") >> >>does not raise any exception even if *some_system_command* does not >

Re: pipes like perl

2005-08-23 Thread infidel
Here's one technique I use to run an external command in a particular module: stdin, stdout, stderr = os.popen3(cmd) stdin.close() results = stdout.readlines() stdout.close() errors = stderr.readlines() stderr.close() if errors: r

Re: pipes like perl

2005-08-23 Thread bruno modulix
max(01)* wrote: > hi. (snip) > it doesn't work, since "*do_something*" and *do_something_more* are > always executed (it seems like > > MYPIPE = os.popen("*some_system_command*", "r") > > does not raise any exception even if *some_system_command* does not > exist/work... > > any help? http://

Re: Pipes of binaries - IPC::Run

2005-05-11 Thread Peter Hansen
Swaroop C H wrote: > Is there a Python equivalent of Perl's IPC::Run module [ > http://search.cpan.org/dist/IPC-Run/lib/IPC/Run.pm ] ? I don't know Perl, and don't plan to read all of that page you referenced, but judging from the subject line and the half-sentence description near the top of th