hi, Is there any good projects in python available for beginner/novice like me
pls help. regards, ravi chandel Original message From:Anand Balachandran
Pillai abpil...@gmail.com Date: 14 Dec 09 12:16:30 Subject:Re: [BangPypers]
Reg : Python Scripting To: Bangalore Python Users Group India
On Mon, Dec 14, 2009 at 10:04 AM, murugadoss murugadoss2...@gmail.comwrote:
Hello,
I am new to python scripting. I saw about subprocess module. I need to
send an input to the running src,like
eg: For adding two numbers
1. image running and waiting for input from user
2.
Hi,
Thank u for the reply. My program is like this;
int i;
printf(?);
scanf(%d,i);
python script:
#!/usr/bin/env python
import sys
import os
import time
os.system(./a.out)
os.system(2)
output:
./prog.py
? Waiting for input
My input is given in the next line of the script.The control
On Mon, Dec 14, 2009 at 11:09 AM, murugadoss murugadoss2...@gmail.comwrote:
Hi,
Thank u for the reply. My program is like this;
This is the third or fourth time this is being repeated. Please look through
http://docs.python.org/library/subprocess.html
--
~noufal
On Mon, Dec 14, 2009 at 11:09 AM, murugadoss murugadoss2...@gmail.comwrote:
Hi,
Thank u for the reply. My program is like this;
int i;
printf(?);
scanf(%d,i);
python script:
#!/usr/bin/env python
import sys
import os
import time
os.system(./a.out)
os.system(2)
output:
may be you should redesign your program/logic , os.system call won't return
without finishing
On Wed, Dec 9, 2009 at 4:34 PM, murugadoss murugadoss2...@gmail.com wrote:
Hello,
I am writing a python script for executing my program. This is a thread
program and on execution get the input
On Wed, Dec 9, 2009 at 4:34 PM, murugadoss murugadoss2...@gmail.com wrote:
\
Sample Script:
os.system(my program)
child.sendline(input arguments)
Use subprocess module.
Kushal
--
http://fedoraproject.org
http://kushaldas.in
___
BangPypers mailing
On Wed, Dec 9, 2009 at 4:34 PM, murugadoss murugadoss2...@gmail.com wrote:
But since the thread is waiting for input ( in a while loop ), the control
is not coming to next line of the script. (ie: to input arguments line).
Sample Script:
os.system(my program)
child.sendline(input arguments)