Re: Running a program from another program.

2010-06-18 Thread Laurent Verweijen
Op donderdag 17-06-2010 om 15:16 uur [tijdzone -0700], schreef Stephen Hansen: > On 6/17/10 3:06 PM, Laurent Verweijen wrote: > >> > >> In your other thread you include an actual traceback: > >> > >> Traceback (most recent call last): > >> File "subchronous_test.py", line 5, in > >> send_al

Re: Running a program from another program.

2010-06-17 Thread Stephen Hansen
On 6/17/10 3:06 PM, Laurent Verweijen wrote: >> >> In your other thread you include an actual traceback: >> >> Traceback (most recent call last): >> File "subchronous_test.py", line 5, in >> send_all(str(p), n) >> File "/home/Somelauw/asynchronous.py", line 145, in send_all >> while le

Re: Running a program from another program.

2010-06-17 Thread Laurent Verweijen
Op donderdag 17-06-2010 om 14:48 uur [tijdzone -0700], schreef Stephen Hansen: > On 6/17/10 2:40 PM, Laurent Verweijen wrote: > > Op donderdag 17-06-2010 om 14:36 uur [tijdzone -0700], schreef Stephen > > Hansen: > >> On 6/17/10 2:09 PM, Laurent Verweijen wrote: > >>> It just gives me an empty st

Re: Running a program from another program.

2010-06-17 Thread Stephen Hansen
On 6/17/10 2:40 PM, Laurent Verweijen wrote: > Op donderdag 17-06-2010 om 14:36 uur [tijdzone -0700], schreef Stephen > Hansen: >> On 6/17/10 2:09 PM, Laurent Verweijen wrote: >>> It just gives me an empty string. >>> >>> Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41) >>> [GCC 4.4.3] on linux2

Re: Running a program from another program.

2010-06-17 Thread Laurent Verweijen
Op donderdag 17-06-2010 om 14:36 uur [tijdzone -0700], schreef Stephen Hansen: > On 6/17/10 2:09 PM, Laurent Verweijen wrote: > > It just gives me an empty string. > > > > Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41) > > [GCC 4.4.3] on linux2 > > Type "help", "copyright", "credits" or "licen

Re: Running a program from another program.

2010-06-17 Thread Laurent Verweijen
Op donderdag 17-06-2010 om 23:09 uur [tijdzone +0200], schreef Laurent Verweijen: > Op donderdag 17-06-2010 om 13:48 uur [tijdzone -0700], schreef Stephen > Hansen: > > On 6/17/10 1:42 PM, Laurent Verweijen wrote: > > > I tried putting what Ian Kelly said in my code, by it doesn't work for > > >

Re: Running a program from another program.

2010-06-17 Thread Stephen Hansen
On 6/17/10 2:09 PM, Laurent Verweijen wrote: > It just gives me an empty string. > > Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41) > [GCC 4.4.3] on linux2 > Type "help", "copyright", "credits" or "license" for more information. from asynchronous import * p = Popen(["python", "increme

Re: Running a program from another program.

2010-06-17 Thread Laurent Verweijen
Op donderdag 17-06-2010 om 13:48 uur [tijdzone -0700], schreef Stephen Hansen: > On 6/17/10 1:42 PM, Laurent Verweijen wrote: > > I tried putting what Ian Kelly said in my code, by it doesn't work for > > me. > > > > Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41) > > [GCC 4.4.3] on linux2 > >

Re: Running a program from another program.

2010-06-17 Thread Stephen Hansen
On 6/17/10 1:42 PM, Laurent Verweijen wrote: > I tried putting what Ian Kelly said in my code, by it doesn't work for > me. > > Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41) > [GCC 4.4.3] on linux2 > Type "help", "copyright", "credits" or "license" for more information. import os imp

Re: Running a program from another program.

2010-06-17 Thread Laurent Verweijen
Op donderdag 17-06-2010 om 13:01 uur [tijdzone -0700], schreef Stephen Hansen: > On 6/17/10 12:13 PM, Laurent Verweijen wrote: > > How do I make sure the inputstream stays open after the first call to > > communicate? > > This was just asked a few days ago in different words-- check out the > thr

Re: Running a program from another program.

2010-06-17 Thread Stephen Hansen
On 6/17/10 12:13 PM, Laurent Verweijen wrote: > How do I make sure the inputstream stays open after the first call to > communicate? This was just asked a few days ago in different words-- check out the thread, a couple solutions are offered. In short, you need to make stdin/stdout non-blocking:

Running a program from another program.

2010-06-17 Thread Laurent Verweijen
I have a program called increment.py as follows: #!/usr/bin/python n = 0 while True: n = int(raw_input(n)) + 1 This is probably very easy to understand, but I want to run this program from another python program. Below is an attempt