waldenner / robotframework

Automatically exported from code.google.com/p/robotframework
Apache License 2.0
0 stars 0 forks source link

Separate library for running processes #485

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Current `Run` and `Start Process` keywords don't handle spaces in the
command or arguments very well. We could make that work if we:

1) change the signature so that the command and arguments are given as
separate arguments, and
2) use `suprocess` (available since Python 2.5) instead of the current
`os.popen`

Radically changing the current keywords would be backwards-incompatible, so
it's probably better to implement new keywords instead. We need to discuss
do we want to add them to `OperatingSystem` or would it be a better idea to
create a new `Process` library.

The `subprocess` module makes it possible to control the environment of the
started process better than the old `popen` variants. One of the
configuration parameters allows setting the working directory. That
functionality was requested in issue 345.

Original issue reported on code.google.com by pekka.klarck on 24 Feb 2010 at 7:51

GoogleCodeExporter commented 9 years ago
Issue 345 has been merged into this issue.

Original comment by pekka.klarck on 24 Feb 2010 at 7:52

GoogleCodeExporter commented 9 years ago
These keywords need also be able to handle different output encodings.

Original comment by janne.t....@gmail.com on 4 Mar 2010 at 7:02

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Issue 664 has been merged into this issue.

Original comment by pekka.klarck on 20 Sep 2010 at 1:27

GoogleCodeExporter commented 9 years ago
Issue 664 was about adding real support for stopping processes. That ought to 
be easy with subprocess.

Original comment by pekka.klarck on 20 Sep 2010 at 1:38

GoogleCodeExporter commented 9 years ago
It should also be possible to get stdout and stderr separately. See issue 927 
for one use case.

Original comment by pekka.klarck on 11 Aug 2011 at 9:26

GoogleCodeExporter commented 9 years ago
Issue 1173 has been merged into this issue.

Original comment by pekka.klarck on 11 Jul 2012 at 10:29

GoogleCodeExporter commented 9 years ago

Original comment by pekka.klarck on 3 Dec 2012 at 1:10

GoogleCodeExporter commented 9 years ago
Issue 1279 has been merged into this issue.

Original comment by pekka.klarck on 3 Dec 2012 at 1:11

GoogleCodeExporter commented 9 years ago
There seems to be need for this within NSN. Definitely want to get this into 
2.8, perhaps even earlier.

Original comment by pekka.klarck on 18 Feb 2013 at 9:35

GoogleCodeExporter commented 9 years ago

Original comment by jussi.ao...@gmail.com on 6 Mar 2013 at 1:55

GoogleCodeExporter commented 9 years ago
Planned keywords:
- Run Process
- Run Process in Shell
- Start Process
- Stop Process
- Stop All Processes
- Get Process Object
- Kill Proces
- Terminate Process
- Get Pid
- Poll Process
- Wait 

... and possibly others

Original comment by mika.han...@gmail.com on 11 Mar 2013 at 8:49

GoogleCodeExporter commented 9 years ago

Original comment by mika.han...@gmail.com on 14 Mar 2013 at 11:33

GoogleCodeExporter commented 9 years ago

Original comment by mika.han...@gmail.com on 15 Apr 2013 at 7:54

GoogleCodeExporter commented 9 years ago

Original comment by mikko.ko...@gmail.com on 15 Apr 2013 at 10:43

GoogleCodeExporter commented 9 years ago
kwargs support has been added ( issue 1383 ) so we can continue on this highly 
important issue.

Original comment by mikko.ko...@gmail.com on 15 Apr 2013 at 10:45

GoogleCodeExporter commented 9 years ago
This issue was updated by revision d4e2dd225984.

Fixed Windows issues

Original comment by mika.han...@gmail.com on 23 Apr 2013 at 8:39

GoogleCodeExporter commented 9 years ago
This issue was updated by revision 75e0e1d14c93.

Fix big datatest

Original comment by mika.han...@gmail.com on 23 Apr 2013 at 8:46

GoogleCodeExporter commented 9 years ago
This issue was updated by revision 74a542f95e27.

stderr=STDOUT

Original comment by mika.han...@gmail.com on 23 Apr 2013 at 12:11

GoogleCodeExporter commented 9 years ago
This issue was updated by revision 74800f017095.

cwd with stdout and stderr

Original comment by mika.han...@gmail.com on 23 Apr 2013 at 12:11

GoogleCodeExporter commented 9 years ago
The library should now be ready.

There are still issues with Iron Python (output/input PIPE:s) and with Jython.

Original comment by mikko.ko...@gmail.com on 10 May 2013 at 10:40

GoogleCodeExporter commented 9 years ago
Currently the library does not work on Windows with Jython and IronPython.

CPython on all platforms should work as well as Jython on Linux/OSX.

Original comment by jussi.ao...@gmail.com on 31 May 2013 at 1:16

GoogleCodeExporter commented 9 years ago

Original comment by tatu.ka...@eficode.com on 31 May 2013 at 1:54

GoogleCodeExporter commented 9 years ago
is there any possible chance that this can be further enhanced to something 
like a serial process/processes to combine into serial blocks and parallel 
processes into parallel blocks ?

Original comment by reachpar...@gmail.com on 1 Jun 2013 at 1:57

GoogleCodeExporter commented 9 years ago
It would be nice if you can provide keyword to write to the STDIN handle of the 
process. It will be helpful in automating some interactive command wizards 
(like command line based setup which asks series of questions to user one by 
one)

Original comment by pvshew...@gmail.com on 5 Jun 2013 at 9:00

GoogleCodeExporter commented 9 years ago
For interacting with subprocess - take a look at sarge library.

Original comment by myroslav@quintagroup.com on 7 Jun 2013 at 8:33

GoogleCodeExporter commented 9 years ago
This issue was updated by revision fbd6286e95ab.

The library seems to be in pretty good shape. Following changes done:
- Enhanced the documentation.
- Did simple cleanup when it was certain it broke nothing.
- Added several TODOs about needed documentation enhancements, code fixes, etc.

Next up is proofreading the docs and going through the TODOs. Some of them can 
be post-poned to 2.8.1.

Original comment by pekka.klarck on 10 Jun 2013 at 2:30

GoogleCodeExporter commented 9 years ago
Done. Docs in wiki: ProcessLibrary

Original comment by jussi.ao...@gmail.com on 11 Jun 2013 at 12:53