Re: Passing parameters for a C program in Linux.

2009-07-01 Thread bobicanprogram
On Jun 30, 6:46 am, "venutaurus...@gmail.com" wrote: > Hi all, >I have to write an automted script which will test my c > program. That program when run will ask for the commands. For example: > > local-host# ./cli > Enter 1 for add > Enter 2 for sub > Enter 3 for mul > 1--

Re: Passing parameters for a C program in Linux.

2009-06-30 Thread Miles Kaufmann
On Jun 30, 2009, at 6:46 AM, venutaurus...@gmail.com wrote: I have to write an automted script which will test my c program. That program when run will ask for the commands. Keep in mind that, if your test script checks the program's output before giving it input, you can run into pro

Re: Passing parameters for a C program in Linux.

2009-06-30 Thread pdpi
On Jun 30, 11:46 am, "venutaurus...@gmail.com" wrote: > Hi all, >        I have to write an automted script which will test my c > program. That program when run will ask for the commands. For example: > > local-host# ./cli > Enter 1 for add > Enter 2 for sub > Enter 3 for mul > 1            -

Re: Passing parameters for a C program in Linux.

2009-06-30 Thread Petr Messner
2009/6/30 venutaurus...@gmail.com : ... > Can you give some more explanation about how exactly this can be > done.. Popen object enables you to run any program in a newly-created child process, write to its standard input and read from its standard and error outputs. There is an example how your

Re: Passing parameters for a C program in Linux.

2009-06-30 Thread venutaurus...@gmail.com
On Jun 30, 5:42 pm, Petr Messner wrote: > Hi, > > this can be done using module "subprocess"; there is also function > popen() in module "os" and module popen2, but they are deprecated > since Python 2.6. > > PM > > 2009/6/30 venutaurus...@gmail.com : > > > Hi all, > >       I have to write an aut

Re: Passing parameters for a C program in Linux.

2009-06-30 Thread Petr Messner
Hi, this can be done using module "subprocess"; there is also function popen() in module "os" and module popen2, but they are deprecated since Python 2.6. PM 2009/6/30 venutaurus...@gmail.com : > Hi all, > I have to write an automted script which will test my c > program. That program whe

Passing parameters for a C program in Linux.

2009-06-30 Thread venutaurus...@gmail.com
Hi all, I have to write an automted script which will test my c program. That program when run will ask for the commands. For example: local-host# ./cli Enter 1 for add Enter 2 for sub Enter 3 for mul 1---Our option Enter two numbers 44 33 Our option Result is 77