Revision: 07da991c20ea
Branch: default
Author: Mika Hänninen <[email protected]>
Date: Tue May 28 02:36:09 2013
Log: doc updated
http://code.google.com/p/robotframework/source/detail?r=07da991c20ea
Modified:
/doc/libraries/Process.html
/src/robot/libraries/Process.py
=======================================
--- /doc/libraries/Process.html Tue May 21 03:21:57 2013
+++ /doc/libraries/Process.html Tue May 28 02:36:09 2013
@@ -5,7 +5,7 @@
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="-1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
-<meta content="Robot Framework trunk 20130515 (Python 2.7.3 on linux2)"
name="Generator">
+<meta content="Robot Framework trunk 20130515 (Python 2.7.2 on darwin)"
name="Generator">
<link rel="icon" type="image/x-icon"
href="data:image/x-icon;base64,AAABAAEAEBAQAAEABAAoAQAAFgAAACgAAAAQAAAAIAAAAAEABAAAAAAAAAIAAAAAAAAAAAAAEAAAAAAAAAAAAAAAJEBoACtnfgA5cYYAERsiAEx2lAAbKkQAcazBACZCVwAcM1cAK0ucAAMDBQAnQncASG+FABkoVQAyWmgA6f8SgvH/Ij99+GLyIinyJfn/Yi//KSLzUy9iZogpIld3/4JVVTkid7vyUjNVNVJEAGOZ6Z7pXwAABpmZkRiLAAAGiJZpmGAAAEEt3SXdxAAATC7o/u3EAAC8MRZpjasAAAY1VVVTYAAABKqqqqpAAAAADKqq4AAAAAAAv4sAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMADAADgAwAA4AcAAOAHAADgBwAAwAcAAOAHAADgDwAA8A8AAPg/AAD+fwAA">
<style media="all" type="text/css">
body {
@@ -169,7 +169,7 @@
(function(a){var r=a.fn.domManip,d="_tmplitem",q=/^[^<]*(<[\w\W]+>)[^>]*$|
\{\{\! /,b={},f={},e,p={key:0,data:{}},i=0,c=0,l=[];function g(g,d,h,e){var
c={data:e||(e===0||
e===false)?e:d?d.data:{},_wrap:d?d._wrap:null,tmpl:null,parent:d||
null,nodes:[],calls:u,nest:w,wrap:x,html:v,update:t};g&&a.extend(c,g,{nodes:[],parent:d});if(h){c.tmpl=h;c._ctnt=c._ctnt|
|c.tmpl(a,c);c.key=++i;(l.length?f:b)[i]=c}return
c}a.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(f,d){a.fn[f]=function(n){var
g=[],i=a(n),k,h,m,l,j=this.length===1&&this[0].parentNode;e=b||
{};if(j&&j.nodeType===11&&j.childNodes.length===1&&i.length===1){i[d](this[0]);g=this}else{for(h=0,m=i.length;h<m;h++){c=h;k=(h>0?this.clone(true):this).get();a(i[h])[d](k);g=g.concat(k)}c=0;g=this.pushStack(g,f,i.selector)}l=e;e=null;a.tmpl.complete(l);return
g}});a.fn.extend({tmpl:function(d,c,b){return
a.tmpl(this[0],d,c,b)},tmplItem:function(){return
a.tmplItem(this[0])},template:function(b){return
a.template(b,this[0])},domManip:function(d,m,k){if(d[0]&&a.isArray(d[0])){var
g=a.makeArray(arguments),h=d[0],j=h.length,i=0,f;while(i<j&&!(f=a.data(h[i++],"tmplItem")));if(f&&c)g[2]=function(b){a.tmpl.afterManip(this,b,k)};r.apply(this,g)}else
r.apply(this,arguments);c=0;!e&&a.tmpl.complete(b);return
this}});a.extend({tmpl:function(d,h,e,c){var
i,k=!c;if(k){c=p;d=a.template[d]||a.template(null,d);f={}}else
if(!d){d=c.tmpl;b[c.key]=c;c.nodes=[];c.wrapped&&n(c,c.wrapped);return
a(j(c,null,c.tmpl(a,c)))}if(!d)return[];if(typeof h==="function")h=h.call(c|
|{});e&&e.wrapped&&n(e,e.wrapped);i=a.isArray(h)?a.map(h,function(a){return
a?g(e,c,d,a):null}):[g(e,c,d,h)];return
k?a(j(c,null,i)):i},tmplItem:function(b){var c;if(b instanceof
a)b=b[0];while(b&&b.nodeType===1&&!(c=a.data(b,"tmplItem"))&&(b=b.parentNode));return
c||p},template:function(c,b){if(b){if(typeof b==="string")b=o(b);else if(b
instanceof a)b=b[0]||{};if(b.nodeType)b=a.data(b,"tmpl")||
a.data(b,"tmpl",o(b.innerHTML));return typeof
c==="string"?(a.template[c]=b):b}return c?typeof
c!=="string"?a.template(null,c):a.template[c]||
a.template(null,q.test(c)?c:a(c)):null},encode:function(a){return(""+a).split("&").join("&").split("<").join("<").split(">").join(">").split('"').join(""").split("'").join("'")}});a.extend(a.tmpl,{tag:{tmpl:{_default:{$2:"null"},open:"if($notnull_1){__=__.concat($item.nest($1,$2));}"},wrap:{_default:{$2:"null"},open:"$item.calls(__,$1,$2);__=[];",close:"call=$item.calls();__=call._.concat($item.wrap(call,__));"},each:{_default:{$2:"$index,
$value"},open:"if($notnull_1){$.each($1a,function($2){with(this){",close:"}});}"},"if":{open:"if(($notnull_1)
&& $1a){",close:"}"},"else":{_default:{$1:"true"},open:"}else
if(($notnull_1) &&
$1a){"},html:{open:"if($notnull_1){__.push($1a);}"},"=":{_default:{$1:"$data"},open:"if($notnull_1){__.push($.encode($1a));}"},"!":{open:""}},complete:function(){b={}},afterManip:function(f,b,d){var
e=b.nodeType===11?a.makeArray(b.childNodes):b.nodeType===1?[b]:[];d.call(f,b);m(e);c++}});function
j(e,g,f){var b,c=f?a.map(f,function(a){return typeof
a==="string"?e.key?a.replace(/(<\w+)(?=[\s>])(?![^>]*_tmplitem)([^>]*)/g,"$1 "+d+'="'+e.key+'"
$2'):a:j(a,e,a._ctnt)}):e;if(g)return
c;c=c.join("");c.replace(/^\s*([^<\s][^<]*)?(<[\w\W]+>)([^>]*[^>\s])?\s*$/,function(f,c,e,d){b=a(e).get();m(b);if(c)b=k(c).concat(b);if(d)b=b.concat(k(d))});return
b?b:k(c)}function k(c){var
b=document.createElement("div");b.innerHTML=c;return
a.makeArray(b.childNodes)}function o(b){return new
Function("jQuery","$item","var
$=jQuery,call,__=[],$data=$item.data;with($data){__.push('"+a.trim(b).replace(/([\\'])/g,"\\$1").replace(/[\r\t\n]/g," ").replace(/\$\{([^\}]*)\}/g,"{{=
$1}}").replace(/\{\{(\/?)(\w+|.)(?:\(((?:[^\}]|
\}(?!\}))*?)?\))?(?:\s+(.*?)?)?(\(((?:[^\}]|
\}(?!\}))*?)\))?\s*\}\}/g,function(m,l,k,g,b,c,d){var
j=a.tmpl.tag[k],i,e,f;if(!j)throw"Unknown template tag: "+k;i=j._default||
[];if(c&&!/\w$/.test(b)){b+=c;c=""}if(b){b=h(b);d=d?","+h(d)+")":c?")":"";e=c?b.indexOf(".")>-1?b+h(c):"("+b+").call($item"+d:b;f=c?e:"(typeof("+b+")==='function'?("+b+").call($item):("+b+"))"}else
f=e=i.$1|
|"null";g=h(g);return"');"+j[l?"close":"open"].split("$notnull_1").join(b?"typeof("+b+")!=='undefined'
&&
("+b+")!=null":"true").split("$1a").join(f).split("$1").join(e).split("$2").join(g|
|i.$2||"")+"__.push('"})+"');}return __;")}function
n(c,b){c._wrap=j(c,true,a.isArray(b)?b:[q.test(b)?b:a(b).html()]).join("")}function
h(a){return a?a.replace(/\\'/g,"'").replace(/\\\\/g,"\\"):null}function
s(b){var
a=document.createElement("div");a.appendChild(b.cloneNode(true));return
a.innerHTML}function m(o){var
n="_"+c,k,j,l={},e,p,h;for(e=0,p=o.length;e<p;e++){if((k=o[e]).nodeType!==1)continue;j=k.getElementsByTagName("*");for(h=j.length-1;h>=0;h--)m(j[h]);m(k)}function
m(j){var
p,h=j,k,e,m;if(m=j.getAttribute(d)){while(h.parentNode&&(h=h.parentNode).nodeType===1&&!(p=h.getAttribute(d)));if(p!==m){h=h.parentNode?h.nodeType===11?0:h.getAttribute(d)|
|0:0;if(!(e=b[m])){e=f[m];e=g(e,b[h]||
f[h]);e.key=++i;b[i]=e}c&&o(m)}j.removeAttribute(d)}else
if(c&&(e=a.data(j,"tmplItem"))){o(e.key);b[e.key]=e;h=a.data(j.parentNode,"tmplItem");h=h?h.key:0}if(e){k=e;while(k&&k.key!=h){k.nodes.push(j);k=k.parent}delete
e._ctnt;delete e._wrap;a.data(j,"tmplItem",e)}function
o(a){a=a+n;e=l[a]=l[a]||g(e,b[e.parent.key+n]||e.parent)}}}function
u(a,d,c,b){if(!a)return
l.pop();l.push({_:a,tmpl:d,item:this,data:c,options:b})}function
w(d,c,b){return a.tmpl(a.template(d),c,b,this)}function x(b,d){var
c=b.options||{};c.wrapped=d;return
a.tmpl(a.template(b.tmpl),b.data,c,b.item)}function v(d,c){var
b=this._wrap;return a.map(a(a.isArray(b)?b.join(""):b).filter(d|
|"*"),function(a){return c?a.innerText||a.textContent:a.outerHTML||
s(a)})}function t(){var
b=this.nodes;a.tmpl(null,null,null,this).insertBefore(b[0]);a(b).remove()}})(jQuery);
</script>
<script type="text/javascript">
-libdoc = {"doc":"<p>Robot Framework test library for running
processes.</p>\n<p>This library utilizes Python's <a
href=\"http://docs.python.org/2.7/library/subprocess.html\">subprocess</a>
module and its <a
href=\"http://docs.python.org/2.7/library/subprocess.html#subprocess.Popen\">Popen</a>
class.</p>\n<p>The library has following main
usages:</p>\n<ul>\n<li>Starting a processes, and managing their handles,
stdouts and stderrs (e.g. <a href=\"#Run Process\" class=\"name\">Run
Process</a> and <a href=\"#Start Process\" class=\"name\">Start Process</a>
keywords).</li>\n<li>Stopping processes started by this library (e.g. <a
href=\"#Terminate All Processes\" class=\"name\">Terminate All
Processes</a> and <a href=\"#Terminate Process\" class=\"name\">Terminate
Process</a> keywords). See <a href=\"#Stopping processes\"
class=\"name\">Stopping processes</a> for more
information.</li>\n<li>Switching between processes (e.g. <a href=\"#Switch
Process\" class=\"name\">Switch Process</a> keyword).</li>\n<li>Checking
process status (e.g. <a href=\"#Process Should Be Running\"
class=\"name\">Process Should Be Running</a> and <a href=\"#Process Should
Be Stopped\" class=\"name\">Process Should Be Stopped</a>
keywords).</li>\n</ul>\n<p>Note that this library has not been designed for
<a href=\"http://ironpython.codeplex.com/\">IronPython</a>
compatibility.</p>\n<h3>Table of contents</h3>\n<ul>\n<li><a
href=\"#Configurations\" class=\"name\">Configurations</a></li>\n<li><a
href=\"#Active process\" class=\"name\">Active process</a></li>\n<li><a
href=\"#Stopping processes\" class=\"name\">Stopping
processes</a></li>\n<li><a href=\"#ExecutionResult\"
class=\"name\">ExecutionResult</a></li>\n<li><a href=\"#Similarities with
OperatingSystem library\" class=\"name\">Similarities with OperatingSystem
library</a></li>\n<li><a href=\"#Example\"
class=\"name\">Example</a></li>\n</ul>\n<h2
id=\"Configurations\">Configurations</h2>\n<p><a href=\"#Run Process\"
class=\"name\">Run Process</a> and <a href=\"#Start Process\"
class=\"name\">Start Process</a> keywords can be given several named
arguments, which are listed below.</p>\n<ul>\n<li><span
class=\"name\">cwd</span> specifies the working directory</li>\n<li><span
class=\"name\">shell</span> specifies whether shell is used for program
execution</li>\n<li><span class=\"name\">env</span> specifies the
environment of the program being run</li>\n<li><span
class=\"name\">stdout</span> is a file path of standard
output</li>\n<li><span class=\"name\">stderr</span> is a file path of
standard error</li>\n<li><span class=\"name\">alias</span> is a short name
for the process which can be used for interacting</li>\n</ul>\n<p>with that
process.</p>\n<h3>Current working directory</h3>\n<p>If <span
class=\"name\">cwd</span> argument is not given, the child program's
execution directory will be a the directory where Robot Framework
executable was launched.</p>\n<h3>Running processes in a shell</h3>\n<p>The
<span class=\"name\">shell</span> argument specifies whether shell is used
as program during execution. By default this has value <span
class=\"name\">False</span>, which means that shell specific commands, like
<span class=\"name\">copy</span> and <span class=\"name\">dir</span> are
not available. It also means that process runnable and its arguments must
be given as a separate argument for <a href=\"#Run Process\"
class=\"name\">Run Process</a> and <a href=\"#Start Process\"
class=\"name\">Start Process</a> keywords.</p>\n<p>When <span
class=\"name\">shell</span> is <span class=\"name\">True</span>, the
program with its arguments can be given in a single string for <a
href=\"#Run Process\" class=\"name\">Run Process</a> and <a href=\"#Start
Process\" class=\"name\">Start Process</a> keywords.</p>\n<p>On Unix, the
default shell is <span class=\"name\">/bin/sh</span>. On Windows, the
default shell is specified by the <span class=\"name\">COMSPEC</span>
environment variable.</p>\n<h3>Environment</h3>\n<p>If <span
class=\"name\">env</span> argument is not given or is <span
class=\"name\">None</span>, then the current process's environment is used.
Argument can be used to customize the environment of the program being
run.</p>\n<p>There are two ways of giving environment
variables:</p>\n<ul>\n<li>as a dictionary containing environment variables
in a key-value pairs</li>\n<li>or using special key <span
class=\"name\">env:</span> in the argument.</li>\n</ul>\n<p>Examples
below.</p>\n<table border=\"1\">\n<tr>\n<td>${result}=</td>\n<td>Run
Process</td>\n<td>python -c \"import os; print
os.environ;\"</td>\n<td>shell=True</td>\n<td>env:specialvar=spessu</td>\n</tr>\n<tr>\n<td>${result}=</td>\n<td>Run
Process</td>\n<td>python -c \"import os; print
os.environ;\"</td>\n<td>shell=True</td>\n<td>env=${setenv}</td>\n</tr>\n</table>\n<h3>Standard
output and error</h3>\n<p>Process output and error streams can be given as
an argument to <a href=\"#Run Process\" class=\"name\">Run Process</a> and
<a href=\"#Start Process\" class=\"name\">Start Process</a> keywords. By
default streams are stored in temporary files. Information about these
streams is stored into <a href=\"#ExecutionResult\"
class=\"name\">ExecutionResult</a> object.</p>\n<p>The <span
class=\"name\">stderr</span> can be redirected to the standard output
stream by giving argument in a way shown below.</p>\n<table
border=\"1\">\n<tr>\n<td>${result}=</td>\n<td>Run Process</td>\n<td>python
-c
\"print 'hello';1/0\"</td>\n<td>shell=True</td>\n<td>stderr=STDOUT</td>\n<td></td>\n</tr>\n<tr>\n<td>${result}=</td>\n<td>Run
Process</td>\n<td>python -c
\"print 'hello';1/0\"</td>\n<td>shell=True</td>\n<td>stdout=filename.txt</td>\n<td>stderr=filename.txt</td>\n</tr>\n</table>\n<h2
id=\"Active process\">Active process</h2>\n<p>The test library keeps record
which of the started processes is an active process. Many of the library
keywords have <span class=\"name\">handle</span> as optional argument. This
means that if argument <span class=\"name\">handle</span> is NOT given,
then the active process is used for keyword. Active process can be switched
using keyword <a href=\"#Switch Process\" class=\"name\">Switch
Process</a>.</p>\n<p>The most recently started process is always a <a
href=\"#Active process\" class=\"name\">active process</a>.</p>\n<h2
id=\"Stopping processes\">Stopping processes</h2>\n<p>Due restrictions set
by <a
href=\"http://docs.python.org/2.7/library/subprocess.html\">subprocess</a>
module, the process stopping is NOT functioning properly on <a
href=\"http://www.jython.org\">Jython</a> and pre-2.6 Python. In Jython
especially we don't have the information about the PIDs of the started
processes therefore making the stopping of the process difficult.</p>\n<h2
id=\"ExecutionResult\">ExecutionResult</h2>\n<p>This object contains
information about the process execution.</p>\n<p>Included information
is:</p>\n<ul>\n<li><span class=\"name\">stdout</span> file content of
standard output stream</li>\n<li><span class=\"name\">stderr</span> file
content of standard error stream</li>\n<li><span
class=\"name\">stdout_path</span> filepath of standard
output</li>\n<li><span class=\"name\">stderr_path</span> filepath of
standard error</li>\n<li><span class=\"name\">exit_code</span> from the
process.</li>\n</ul>\n<table
border=\"1\">\n<tr>\n<td>${result}=</td>\n<td>Run
Process</td>\n<td>python</td>\n<td>-c</td>\n<td>${command}</td>\n</tr>\n<tr>\n<td>${output1}=</td>\n<td>Get
File</td>\n<td>${result.stdout_path}</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>${output2}=</td>\n<td>Get
File</td>\n<td>${result.stderr_path}</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>Log</td>\n<td>${result.exit_code}</td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>Should
Be
Equal</td>\n<td>${result.stdout}</td>\n<td>${output1}</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>Should
Be
Equal</td>\n<td>${result.stderr}</td>\n<td>${output2}</td>\n<td></td>\n<td></td>\n</tr>\n</table>\n<h2
id=\"Similarities with OperatingSystem library\">Similarities with
OperatingSystem library</h2>\n<p>The OperatingSystem library also contains
the keywords <a href=\"#Start Process\" class=\"name\">Start Process</a>
and <a href=\"#Switch Process\" class=\"name\">Switch Process</a>. In the
situation that these both libraries are in use within the same test suite,
the <span class=\"name\">Process</span> library's keywords will be
preferred.</p>\n<p>You can still use OperatingSystem keywords by calling it
explicitly (e.g. <span class=\"name\">OperatingSystem.Start Process</span>)
or by setting library search order using <span
class=\"name\">BuiltIn</span> library's keyword <span class=\"name\">Set
Library Search Order</span> and then calling <a href=\"#Start Process\"
class=\"name\">Start Process</a>.</p>\n<table
border=\"1\">\n<tr>\n<td><b>*</b> Settings
<b>*</b></td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>Library</td>\n<td>Process</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>Library</td>\n<td>OperatingSystem</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td></td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td><b>*</b>
Test Cases
<b>*</b></td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>Similar
libraries in
use</td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td></td>\n<td><a
href=\"#Start Process\" class=\"name\">Start
Process</a></td>\n<td>/path/command.sh</td>\n<td># Process Library keyword
is used</td>\n</tr>\n<tr>\n<td></td>\n<td><span
class=\"name\">OperatingSystem.Start
Process</span></td>\n<td>${CURDIR}${/}mytool</td>\n<td># OperatingSystem
library keyword is used</td>\n</tr>\n<tr>\n<td></td>\n<td><span
class=\"name\">Process.Start
Process</span></td>\n<td>${CURDIR}${/}mytool</td>\n<td># Process library
keyword is used</td>\n</tr>\n<tr>\n<td></td>\n<td>Set Library Search
Order</td>\n<td>OperatingSystem</td>\n<td></td>\n</tr>\n<tr>\n<td></td>\n<td><a
href=\"#Start Process\" class=\"name\">Start
Process</a></td>\n<td>/path/command.sh</td>\n<td># OperatingSystem library
keyword is used</td>\n</tr>\n</table>\n<h2
id=\"Example\">Example</h2>\n<p>The following example demonstrates
library's main usages as stated above.</p>\n<table
border=\"1\">\n<tr>\n<td><b>*</b> Settings
<b>*</b></td>\n<td></td>\n<td></td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>Library</td>\n<td>Process</td>\n<td></td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td></td>\n<td></td>\n<td></td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td><b>*</b>
Test Cases
<b>*</b></td>\n<td></td>\n<td></td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>Example</td>\n<td></td>\n<td></td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td></td>\n<td>${handle1}=</td>\n<td><a
href=\"#Start Process\" class=\"name\">Start
Process</a></td>\n<td>/path/command.sh</td>\n<td>shell=True</td>\n<td>cwd=/path</td>\n</tr>\n<tr>\n<td></td>\n<td>${handle2}=</td>\n<td><a
href=\"#Start Process\" class=\"name\">Start
Process</a></td>\n<td>${CURDIR}${/}mytool</td>\n<td>shell=True</td>\n<td></td>\n</tr>\n<tr>\n<td></td>\n<td>${result1}=</td>\n<td><a
href=\"#Wait For Process\" class=\"name\">Wait For
Process</a></td>\n<td>${handle1}</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td></td>\n<td><a
href=\"#Terminate Process\" class=\"name\">Terminate
Process</a></td>\n<td>${handle2}</td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td></td>\n<td><a
href=\"#Process Should Be Stopped\" class=\"name\">Process Should Be
Stopped</a></td>\n<td>${handle2}</td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td></td>\n<td>[Teardown]</td>\n<td><a
href=\"#Terminate All Processes\" class=\"name\">Terminate All
Processes</a></td>\n<td>kill=True</td>\n<td></td>\n<td></td>\n</tr>\n</table>","generated":"2013-05-21
13:20:31","inits":[],"keywords":[{"args":"handle=None","doc":"<p>Returns a
process ID of process with <span
class=\"name\">handle</span>.</p>\n<p>Argument <span
class=\"name\">handle</span> is optional, if <span
class=\"name\">None</span> then the active process is used.</p>\n<p>Return
value is a integer value.</p>\n<p>Examples:</p>\n<table
border=\"1\">\n<tr>\n<td>${handle1}=</td>\n<td><a href=\"#Start Process\"
class=\"name\">Start Process</a></td>\n<td>python -c
\"print 'hello'\"</td>\n<td>shell=True</td>\n<td>alias=hello</td>\n<td></td>\n</tr>\n<tr>\n<td>${pid_1}=</td>\n<td><a
href=\"#Get Process Id\" class=\"name\">Get Process
Id</a></td>\n<td></td>\n<td></td>\n<td></td>\n<td># Gets PID of the active
process</td>\n</tr>\n<tr>\n<td>${pid_2}=</td>\n<td><a href=\"#Get Process
Id\" class=\"name\">Get Process
Id</a></td>\n<td>${handle1}</td>\n<td></td>\n<td></td>\n<td># Gets PID with
<span
class=\"name\">handle1</span></td>\n</tr>\n<tr>\n<td>${pid_3}=</td>\n<td><a
href=\"#Get Process Id\" class=\"name\">Get Process
Id</a></td>\n<td>hello</td>\n<td></td>\n<td></td>\n<td># Gets PID with
alias <span class=\"name\">hello</span></td>\n</tr>\n<tr>\n<td>Should Be
Equal As
Integers</td>\n<td>${pid_1}</td>\n<td>${pid_2}</td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>Should
Be Equal As
Integers</td>\n<td>${pid_1}</td>\n<td>${pid_3}</td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n</table>","name":"Get
Process Id","shortdoc":"Returns a process ID of process with
`handle`."},{"args":"handle=None","doc":"<p>Return the underlying Popen
process object with <span class=\"name\">handle</span>.</p>\n<p>Argument
<span class=\"name\">handle</span> is optional, if <span
class=\"name\">None</span> then the active process is
used.</p>","name":"Get Process Object","shortdoc":"Return the underlying
Popen process object with `handle`."},{"args":"handle=None","doc":"<p>This
keyword checks if process with <span class=\"name\">handle</span> is
running or not.</p>\n<p>Argument <span class=\"name\">handle</span> is
optional, if <span class=\"name\">None</span> then the active process is
used.</p>\n<p>Return value is either <span class=\"name\">True</span>
(process is running) or <span class=\"name\">False</span> (process has
stopped).</p>","name":"Process Is Running","shortdoc":"This keyword checks
if process with `handle` is running or
not."},{"args":"handle=None","doc":"<p>Assertion keyword, which expects
that process with <span class=\"name\">handle</span> is running. Argument
<span class=\"name\">handle</span> is optional, if <span
class=\"name\">None</span> then the active process is used.</p>\n<p>Check
is done using <a href=\"#Process Is Running\" class=\"name\">Process Is
Running</a> keyword.</p>\n<p>Raises an error if process is
stopped.</p>","name":"Process Should Be Running","shortdoc":"Assertion
keyword, which expects that process with `handle`
is"},{"args":"handle=None","doc":"<p>Assertion keyword, which expects that
process with <span class=\"name\">handle</span> is stopped. Argument <span
class=\"name\">handle</span> is optional, if <span
class=\"name\">None</span> then the active process is used.</p>\n<p>Check
is done using <a href=\"#Process Is Running\" class=\"name\">Process Is
Running</a> keyword.</p>\n<p>Raises an error if process is
running.</p>","name":"Process Should Be Stopped","shortdoc":"Assertion
keyword, which expects that process with `handle` is"},{"args":"command,
*arguments, **configuration","doc":"<p>This keyword runs a process and
waits for it to terminate.</p>\n<p>The <span class=\"name\">command</span>
is a child program which is started in a new process, <span
class=\"name\">arguments</span> are arguments for the <span
class=\"name\">command</span> and <span class=\"name\">configuration</span>
are arguments for the <a
href=\"http://docs.python.org/2.7/library/subprocess.html\">subprocess</a>
module's <a
href=\"http://docs.python.org/2.7/library/subprocess.html#subprocess.Popen\">Popen</a>
class (see <a href=\"#Configurations\"
class=\"name\">Configurations</a>).</p>\n<p>Finally switches back to active
process.</p>","name":"Run Process","shortdoc":"This keyword runs a process
and waits for it to terminate."},{"args":"command, *arguments,
**configuration","doc":"<p>This keyword starts a new process.</p>\n<p>The
<span class=\"name\">command</span> is a child program which is started in
a new process, <span class=\"name\">arguments</span> are arguments for the
<span class=\"name\">command</span> and <span
class=\"name\">configuration</span> are arguments for the <a
href=\"http://docs.python.org/2.7/library/subprocess.html\">subprocess</a>
module's <a
href=\"http://docs.python.org/2.7/library/subprocess.html#subprocess.Popen\">Popen</a>
class (see <a href=\"#Configurations\"
class=\"name\">Configurations</a>).</p>\n<p>Configuration can contain the
following options for the process:</p>\n<ul>\n<li>stdout - A file path to
use for standard output from the process</li>\n<li>stderr - A file path to
use for standard error from the process</li>\n<li>shell - True value will
execute the process in a shell</li>\n<li>cwd - Current working directory
for the process</li>\n<li>env and env:VARNAME=VALUE - dictionary for the
environment variables to use</li>\n</ul>\n<p>Returns process index on
success.</p>\n<p>This new process is set as an <a href=\"#Active process\"
class=\"name\">active process</a>.</p>\n<p>Examples:</p>\n<table
border=\"1\">\n<tr>\n<td>${handle1}=</td>\n<td><a href=\"#Start Process\"
class=\"name\">Start
Process</a></td>\n<td>/bin/script.sh</td>\n<td></td>\n</tr>\n<tr>\n<td>${handle2}=</td>\n<td><a
href=\"#Start Process\" class=\"name\">Start
Process</a></td>\n<td>totals</td>\n<td></td>\n</tr>\n<tr>\n<td>${handle3}=</td>\n<td><a
href=\"#Start Process\" class=\"name\">Start
Process</a></td>\n<td>/bin/script.sh</td>\n<td>cwd=/some/directory/</td>\n</tr>\n<tr>\n<td>${handle4}=</td>\n<td><a
href=\"#Start Process\" class=\"name\">Start
Process</a></td>\n<td>/bin/script.sh</td>\n<td>env:MYVAR=myvalue</td>\n</tr>\n<tr>\n<td>${handle5}=</td>\n<td><a
href=\"#Start Process\" class=\"name\">Start
Process</a></td>\n<td>/bin/script.sh</td>\n<td>stdout=somefile.out</td>\n</tr>\n</table>","name":"Start
Process","shortdoc":"This keyword starts a new
process."},{"args":"handle","doc":"<p>This keyword switches active process
into process with <span
class=\"name\">handle</span>.</p>\n<p>Examples:</p>\n<table
border=\"1\">\n<tr>\n<td><a href=\"#Start Process\" class=\"name\">Start
Process</a></td>\n<td>dir</td>\n<td>shell=True</td>\n<td>alias=process1</td>\n</tr>\n<tr>\n<td><a
href=\"#Start Process\" class=\"name\">Start
Process</a></td>\n<td>ls</td>\n<td>shell=True</td>\n<td>alias=process2</td>\n</tr>\n<tr>\n<td>#
currently active process is
process2</td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td><a
href=\"#Switch Process\" class=\"name\">Switch
Process</a></td>\n<td>process1</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>#
now active process is process
1</td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n</table>","name":"Switch
Process","shortdoc":"This keyword switches active process into process with
`handle`."},{"args":"kill=True","doc":"<p>This keyword terminates all
processes started by the library.</p>","name":"Terminate All
Processes","shortdoc":"This keyword terminates all processes started by the
library."},{"args":"handle=None, kill=False","doc":"<p>This keyword
terminates process using either <a
href=\"http://docs.python.org/2.7/library/subprocess.html\">subprocess</a>
module's <span class=\"name\">kill()</span> or <span
class=\"name\">terminate()</span>, which can be selected using <span
class=\"name\">kill</span> argument (by default <span
class=\"name\">terminate()</span> is used).</p>\n<p>Argument <span
class=\"name\">handle</span> is optional, if <span
class=\"name\">None</span> then the active process is
used.</p>\n<p>Examples:</p>\n<table border=\"1\">\n<tr>\n<td><a
href=\"#Terminate Process\" class=\"name\">Terminate
Process</a></td>\n<td></td>\n<td></td>\n<td># Terminates the active
process</td>\n</tr>\n<tr>\n<td><a href=\"#Terminate Process\"
class=\"name\">Terminate
Process</a></td>\n<td>${handle3}</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td><a
href=\"#Terminate Process\" class=\"name\">Terminate
Process</a></td>\n<td>${handle3}</td>\n<td>kill=True</td>\n<td># Using kill
instead of terminate</td>\n</tr>\n</table>","name":"Terminate
Process","shortdoc":"This keyword terminates process using
either"},{"args":"handle=None","doc":"<p>This waits for process with <span
class=\"name\">handle</span> to terminate.</p>\n<p>Argument <span
class=\"name\">handle</span> is optional, if <span
class=\"name\">None</span> then the active process is used.</p>\n<p>Returns
an <a href=\"#ExecutionResult\" class=\"name\">ExecutionResult</a>
object.</p>\n<p>Examples:</p>\n<table
border=\"1\">\n<tr>\n<td>${output}=</td>\n<td><a href=\"#Wait For Process\"
class=\"name\">Wait For
Process</a></td>\n<td></td>\n</tr>\n<tr>\n<td>Should Be Equal As
Integers</td>\n<td>${output.exit_code}</td>\n<td>0</td>\n</tr>\n<tr>\n<td>Should
Match</td>\n<td>${output.stdout}</td>\n<td><span class=\"name\">*text in
the out*</span></td>\n</tr>\n<tr>\n<td>Should
Match</td>\n<td>${output.stderr}</td>\n<td></td>\n</tr>\n</table>","name":"Wait
For Process","shortdoc":"This waits for process with `handle` to
terminate."}],"name":"Process","named_args":true,"scope":"global","version":"trunk
20130515"};
+libdoc = {"doc":"<p>Robot Framework test library for running
processes.</p>\n<p>This library utilizes Python's <a
href=\"http://docs.python.org/2.7/library/subprocess.html\">subprocess</a>
module and its <a
href=\"http://docs.python.org/2.7/library/subprocess.html#subprocess.Popen\">Popen</a>
class.</p>\n<p>The library has following main
usages:</p>\n<ul>\n<li>Starting a processes, and managing their handles,
stdouts and stderrs (e.g. <a href=\"#Run Process\" class=\"name\">Run
Process</a> and <a href=\"#Start Process\" class=\"name\">Start Process</a>
keywords).</li>\n<li>Stopping processes started by this library (e.g. <a
href=\"#Terminate All Processes\" class=\"name\">Terminate All
Processes</a> and <a href=\"#Terminate Process\" class=\"name\">Terminate
Process</a> keywords). See <a href=\"#Stopping processes\"
class=\"name\">Stopping processes</a> for more
information.</li>\n<li>Switching between processes (e.g. <a href=\"#Switch
Process\" class=\"name\">Switch Process</a> keyword).</li>\n<li>Checking
process status (e.g. <a href=\"#Process Should Be Running\"
class=\"name\">Process Should Be Running</a> and <a href=\"#Process Should
Be Stopped\" class=\"name\">Process Should Be Stopped</a>
keywords).</li>\n</ul>\n<p>Note that this library has not been designed for
<a href=\"http://ironpython.codeplex.com/\">IronPython</a>
compatibility.</p>\n<h3>Table of contents</h3>\n<ul>\n<li><a
href=\"#Configurations\" class=\"name\">Configurations</a></li>\n<li><a
href=\"#Active process\" class=\"name\">Active process</a></li>\n<li><a
href=\"#Stopping processes\" class=\"name\">Stopping
processes</a></li>\n<li><a href=\"#ExecutionResult\"
class=\"name\">ExecutionResult</a></li>\n<li><a href=\"#Similarities with
OperatingSystem library\" class=\"name\">Similarities with OperatingSystem
library</a></li>\n<li><a href=\"#Example\"
class=\"name\">Example</a></li>\n</ul>\n<h2
id=\"Configurations\">Configurations</h2>\n<p><a href=\"#Run Process\"
class=\"name\">Run Process</a> and <a href=\"#Start Process\"
class=\"name\">Start Process</a> keywords can be given several named
arguments, which are listed below.</p>\n<ul>\n<li><span
class=\"name\">cwd</span> specifies the working directory</li>\n<li><span
class=\"name\">shell</span> specifies whether shell is used for program
execution</li>\n<li><span class=\"name\">env</span> specifies the
environment of the program being run</li>\n<li><span
class=\"name\">stdout</span> is a file path of standard
output</li>\n<li><span class=\"name\">stderr</span> is a file path of
standard error</li>\n<li><span class=\"name\">alias</span> is a short name
for the process which can be used for interacting</li>\n</ul>\n<p>with that
process.</p>\n<h3>Current working directory</h3>\n<p>If <span
class=\"name\">cwd</span> argument is not given, the child program's
execution directory will be a the directory where Robot Framework
executable was launched.</p>\n<h3>Running processes in a shell</h3>\n<p>The
<span class=\"name\">shell</span> argument specifies whether shell is used
as program during execution. By default this has value <span
class=\"name\">False</span>, which means that shell specific commands, like
<span class=\"name\">copy</span> and <span class=\"name\">dir</span> are
not available. It also means that process runnable and its arguments must
be given as a separate argument for <a href=\"#Run Process\"
class=\"name\">Run Process</a> and <a href=\"#Start Process\"
class=\"name\">Start Process</a> keywords.</p>\n<p>When <span
class=\"name\">shell</span> is <span class=\"name\">True</span>, the
program with its arguments can be given in a single string for <a
href=\"#Run Process\" class=\"name\">Run Process</a> and <a href=\"#Start
Process\" class=\"name\">Start Process</a> keywords.</p>\n<p>On Unix, the
default shell is <span class=\"name\">/bin/sh</span>. On Windows, the
default shell is specified by the <span class=\"name\">COMSPEC</span>
environment variable.</p>\n<h3>Environment</h3>\n<p>If <span
class=\"name\">env</span> argument is not given or is <span
class=\"name\">None</span>, then the current process's environment is used.
Argument can be used to customize the environment of the program being
run.</p>\n<p>There are two ways of giving environment
variables:</p>\n<ul>\n<li>as a dictionary containing environment variables
in a key-value pairs</li>\n<li>or using special key <span
class=\"name\">env:</span> in the argument.</li>\n</ul>\n<p>Examples
below.</p>\n<table border=\"1\">\n<tr>\n<td>${result}=</td>\n<td>Run
Process</td>\n<td>python -c \"import os; print
os.environ;\"</td>\n<td>shell=True</td>\n<td>env:specialvar=spessu</td>\n</tr>\n<tr>\n<td>${result}=</td>\n<td>Run
Process</td>\n<td>python -c \"import os; print
os.environ;\"</td>\n<td>shell=True</td>\n<td>env=${setenv}</td>\n</tr>\n</table>\n<h3>Standard
output and error</h3>\n<p>Process output and error streams can be given as
an argument to <a href=\"#Run Process\" class=\"name\">Run Process</a> and
<a href=\"#Start Process\" class=\"name\">Start Process</a> keywords. By
default streams are stored in temporary files. Information about these
streams is stored into <a href=\"#ExecutionResult\"
class=\"name\">ExecutionResult</a> object.</p>\n<p>The <span
class=\"name\">stderr</span> can be redirected to the standard output
stream by giving argument in a way shown below.</p>\n<table
border=\"1\">\n<tr>\n<td>${result}=</td>\n<td>Run Process</td>\n<td>python
-c
\"print 'hello';1/0\"</td>\n<td>shell=True</td>\n<td>stderr=STDOUT</td>\n<td></td>\n</tr>\n<tr>\n<td>${result}=</td>\n<td>Run
Process</td>\n<td>python -c
\"print 'hello';1/0\"</td>\n<td>shell=True</td>\n<td>stdout=filename.txt</td>\n<td>stderr=filename.txt</td>\n</tr>\n</table>\n<h2
id=\"Active process\">Active process</h2>\n<p>The test library keeps record
which of the started processes is an active process. Many of the library
keywords have <span class=\"name\">handle</span> as optional argument. This
means that if argument <span class=\"name\">handle</span> is NOT given,
then the active process is used for keyword. Active process can be switched
using keyword <a href=\"#Switch Process\" class=\"name\">Switch
Process</a>.</p>\n<p>The most recently started process is always a <a
href=\"#Active process\" class=\"name\">active process</a>.</p>\n<h2
id=\"Stopping processes\">Stopping processes</h2>\n<p>Due restrictions set
by <a
href=\"http://docs.python.org/2.7/library/subprocess.html\">subprocess</a>
module, the process stopping is NOT functioning properly on <a
href=\"http://www.jython.org\">Jython</a> and pre-2.6 Python. In Jython
especially we don't have the information about the PIDs of the started
processes therefore making the stopping of the process difficult.</p>\n<h2
id=\"ExecutionResult\">ExecutionResult</h2>\n<p>This object contains
information about the process execution.</p>\n<p>Included information
is:</p>\n<ul>\n<li><span class=\"name\">stdout</span> file content of
standard output stream</li>\n<li><span class=\"name\">stderr</span> file
content of standard error stream</li>\n<li><span
class=\"name\">stdout_path</span> filepath of standard
output</li>\n<li><span class=\"name\">stderr_path</span> filepath of
standard error</li>\n<li><span class=\"name\">exit_code</span> from the
process.</li>\n</ul>\n<table
border=\"1\">\n<tr>\n<td>${result}=</td>\n<td>Run
Process</td>\n<td>python</td>\n<td>-c</td>\n<td>${command}</td>\n</tr>\n<tr>\n<td>${output1}=</td>\n<td>Get
File</td>\n<td>${result.stdout_path}</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>${output2}=</td>\n<td>Get
File</td>\n<td>${result.stderr_path}</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>Log</td>\n<td>${result.exit_code}</td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>Should
Be
Equal</td>\n<td>${result.stdout}</td>\n<td>${output1}</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>Should
Be
Equal</td>\n<td>${result.stderr}</td>\n<td>${output2}</td>\n<td></td>\n<td></td>\n</tr>\n</table>\n<h2
id=\"Similarities with OperatingSystem library\">Similarities with
OperatingSystem library</h2>\n<p>The OperatingSystem library also contains
the keywords <a href=\"#Start Process\" class=\"name\">Start Process</a>
and <a href=\"#Switch Process\" class=\"name\">Switch Process</a>. In the
situation that these both libraries are in use within the same test suite,
the <span class=\"name\">Process</span> library's keywords will be
preferred.</p>\n<p>You can still use OperatingSystem keywords by calling it
explicitly (e.g. <span class=\"name\">OperatingSystem.Start Process</span>)
or by setting library search order using <span
class=\"name\">BuiltIn</span> library's keyword <span class=\"name\">Set
Library Search Order</span> and then calling <a href=\"#Start Process\"
class=\"name\">Start Process</a>.</p>\n<table
border=\"1\">\n<tr>\n<td><b>*</b> Settings
<b>*</b></td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>Library</td>\n<td>Process</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>Library</td>\n<td>OperatingSystem</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td></td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td><b>*</b>
Test Cases
<b>*</b></td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>Similar
libraries in
use</td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td></td>\n<td><a
href=\"#Start Process\" class=\"name\">Start
Process</a></td>\n<td>/path/command.sh</td>\n<td># Process Library keyword
is used</td>\n</tr>\n<tr>\n<td></td>\n<td><span
class=\"name\">OperatingSystem.Start
Process</span></td>\n<td>${CURDIR}${/}mytool</td>\n<td># OperatingSystem
library keyword is used</td>\n</tr>\n<tr>\n<td></td>\n<td><span
class=\"name\">Process.Start
Process</span></td>\n<td>${CURDIR}${/}mytool</td>\n<td># Process library
keyword is used</td>\n</tr>\n<tr>\n<td></td>\n<td>Set Library Search
Order</td>\n<td>OperatingSystem</td>\n<td></td>\n</tr>\n<tr>\n<td></td>\n<td><a
href=\"#Start Process\" class=\"name\">Start
Process</a></td>\n<td>/path/command.sh</td>\n<td># OperatingSystem library
keyword is used</td>\n</tr>\n</table>\n<h2
id=\"Example\">Example</h2>\n<p>The following example demonstrates
library's main usages as stated above.</p>\n<table
border=\"1\">\n<tr>\n<td><b>*</b> Settings
<b>*</b></td>\n<td></td>\n<td></td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>Library</td>\n<td>Process</td>\n<td></td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td></td>\n<td></td>\n<td></td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td><b>*</b>
Test Cases
<b>*</b></td>\n<td></td>\n<td></td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>Example</td>\n<td></td>\n<td></td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td></td>\n<td>${handle1}=</td>\n<td><a
href=\"#Start Process\" class=\"name\">Start
Process</a></td>\n<td>/path/command.sh</td>\n<td>shell=True</td>\n<td>cwd=/path</td>\n</tr>\n<tr>\n<td></td>\n<td>${handle2}=</td>\n<td><a
href=\"#Start Process\" class=\"name\">Start
Process</a></td>\n<td>${CURDIR}${/}mytool</td>\n<td>shell=True</td>\n<td></td>\n</tr>\n<tr>\n<td></td>\n<td>${result1}=</td>\n<td><a
href=\"#Wait For Process\" class=\"name\">Wait For
Process</a></td>\n<td>${handle1}</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td></td>\n<td><a
href=\"#Terminate Process\" class=\"name\">Terminate
Process</a></td>\n<td>${handle2}</td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td></td>\n<td><a
href=\"#Process Should Be Stopped\" class=\"name\">Process Should Be
Stopped</a></td>\n<td>${handle2}</td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td></td>\n<td>[Teardown]</td>\n<td><a
href=\"#Terminate All Processes\" class=\"name\">Terminate All
Processes</a></td>\n<td>kill=True</td>\n<td></td>\n<td></td>\n</tr>\n</table>","generated":"2013-05-28
12:35:59","inits":[],"keywords":[{"args":"handle=None","doc":"<p>Returns a
process ID of process with <span
class=\"name\">handle</span>.</p>\n<p>Argument <span
class=\"name\">handle</span> is optional, if <span
class=\"name\">None</span> then the active process is used.</p>\n<p>Return
value is a integer value.</p>\n<p>Examples:</p>\n<table
border=\"1\">\n<tr>\n<td>${handle1}=</td>\n<td><a href=\"#Start Process\"
class=\"name\">Start Process</a></td>\n<td>python -c
\"print 'hello'\"</td>\n<td>shell=True</td>\n<td>alias=hello</td>\n<td></td>\n</tr>\n<tr>\n<td>${pid_1}=</td>\n<td><a
href=\"#Get Process Id\" class=\"name\">Get Process
Id</a></td>\n<td></td>\n<td></td>\n<td></td>\n<td># Gets PID of the active
process</td>\n</tr>\n<tr>\n<td>${pid_2}=</td>\n<td><a href=\"#Get Process
Id\" class=\"name\">Get Process
Id</a></td>\n<td>${handle1}</td>\n<td></td>\n<td></td>\n<td># Gets PID with
<span
class=\"name\">handle1</span></td>\n</tr>\n<tr>\n<td>${pid_3}=</td>\n<td><a
href=\"#Get Process Id\" class=\"name\">Get Process
Id</a></td>\n<td>hello</td>\n<td></td>\n<td></td>\n<td># Gets PID with
alias <span class=\"name\">hello</span></td>\n</tr>\n<tr>\n<td>Should Be
Equal As
Integers</td>\n<td>${pid_1}</td>\n<td>${pid_2}</td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>Should
Be Equal As
Integers</td>\n<td>${pid_1}</td>\n<td>${pid_3}</td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n</table>","name":"Get
Process Id","shortdoc":"Returns a process ID of process with
`handle`."},{"args":"handle=None","doc":"<p>Return the underlying Popen
process object with <span class=\"name\">handle</span>.</p>\n<p>Argument
<span class=\"name\">handle</span> is optional, if <span
class=\"name\">None</span> then the active process is
used.</p>","name":"Get Process Object","shortdoc":"Return the underlying
Popen process object with
`handle`."},{"args":"handle=None","doc":"<p>Checks if process with <span
class=\"name\">handle</span> is running or not.</p>\n<p>Argument <span
class=\"name\">handle</span> is optional, if <span
class=\"name\">None</span> then the active process is used.</p>\n<p>Return
value is either <span class=\"name\">True</span> (process is running) or
<span class=\"name\">False</span> (process has
stopped).</p>","name":"Process Is Running","shortdoc":"Checks if process
with `handle` is running or not."},{"args":"handle=None","doc":"<p>This
keyword expects that process with <span class=\"name\">handle</span> is
running. Argument <span class=\"name\">handle</span> is optional, if <span
class=\"name\">None</span> then the active process is used.</p>\n<p>Check
is done using <a href=\"#Process Is Running\" class=\"name\">Process Is
Running</a> keyword.</p>\n<p>Raises an error if process is
stopped.</p>","name":"Process Should Be Running","shortdoc":"This keyword
expects that process with `handle` is
running."},{"args":"handle=None","doc":"<p>This keyword expects that
process with <span class=\"name\">handle</span> is stopped. Argument <span
class=\"name\">handle</span> is optional, if <span
class=\"name\">None</span> then the active process is used.</p>\n<p>Check
is done using <a href=\"#Process Is Running\" class=\"name\">Process Is
Running</a> keyword.</p>\n<p>Raises an error if process is
running.</p>","name":"Process Should Be Stopped","shortdoc":"This keyword
expects that process with `handle` is stopped."},{"args":"command,
*arguments, **configuration","doc":"<p>Runs a process and waits for it to
terminate.</p>\n<p>The <span class=\"name\">command</span> is a child
program which is started in a new process, <span
class=\"name\">arguments</span> are arguments for the <span
class=\"name\">command</span> and <span class=\"name\">configuration</span>
are arguments for the <a
href=\"http://docs.python.org/2.7/library/subprocess.html\">subprocess</a>
module's <a
href=\"http://docs.python.org/2.7/library/subprocess.html#subprocess.Popen\">Popen</a>
class (see <a href=\"#Configurations\"
class=\"name\">Configurations</a>).</p>\n<p>Finally switches back to active
process.</p>","name":"Run Process","shortdoc":"Runs a process and waits for
it to terminate."},{"args":"command, *arguments,
**configuration","doc":"<p>Starts a new process.</p>\n<p>The <span
class=\"name\">command</span> is a child program which is started in a new
process, <span class=\"name\">arguments</span> are arguments for the <span
class=\"name\">command</span> and <span class=\"name\">configuration</span>
are arguments for the <a
href=\"http://docs.python.org/2.7/library/subprocess.html\">subprocess</a>
module's <a
href=\"http://docs.python.org/2.7/library/subprocess.html#subprocess.Popen\">Popen</a>
class (see <a href=\"#Configurations\"
class=\"name\">Configurations</a>).</p>\n<p>Configuration can contain the
following options for the process:</p>\n<ul>\n<li>stdout - A file path to
use for standard output from the process</li>\n<li>stderr - A file path to
use for standard error from the process</li>\n<li>shell - True value will
execute the process in a shell</li>\n<li>cwd - Current working directory
for the process</li>\n<li>env and env:VARNAME=VALUE - dictionary for the
environment variables to use</li>\n</ul>\n<p>Returns process index on
success.</p>\n<p>This new process is set as an <a href=\"#Active process\"
class=\"name\">active process</a>.</p>\n<p>Examples:</p>\n<table
border=\"1\">\n<tr>\n<td>${handle1}=</td>\n<td><a href=\"#Start Process\"
class=\"name\">Start
Process</a></td>\n<td>/bin/script.sh</td>\n<td></td>\n</tr>\n<tr>\n<td>${handle2}=</td>\n<td><a
href=\"#Start Process\" class=\"name\">Start
Process</a></td>\n<td>totals</td>\n<td></td>\n</tr>\n<tr>\n<td>${handle3}=</td>\n<td><a
href=\"#Start Process\" class=\"name\">Start
Process</a></td>\n<td>/bin/script.sh</td>\n<td>cwd=/some/directory/</td>\n</tr>\n<tr>\n<td>${handle4}=</td>\n<td><a
href=\"#Start Process\" class=\"name\">Start
Process</a></td>\n<td>/bin/script.sh</td>\n<td>env:MYVAR=myvalue</td>\n</tr>\n<tr>\n<td>${handle5}=</td>\n<td><a
href=\"#Start Process\" class=\"name\">Start
Process</a></td>\n<td>/bin/script.sh</td>\n<td>stdout=somefile.out</td>\n</tr>\n</table>","name":"Start
Process","shortdoc":"Starts a new
process."},{"args":"handle","doc":"<p>Switches active process into process
with <span class=\"name\">handle</span>.</p>\n<p>Examples:</p>\n<table
border=\"1\">\n<tr>\n<td><a href=\"#Start Process\" class=\"name\">Start
Process</a></td>\n<td>dir</td>\n<td>shell=True</td>\n<td>alias=process1</td>\n</tr>\n<tr>\n<td><a
href=\"#Start Process\" class=\"name\">Start
Process</a></td>\n<td>ls</td>\n<td>shell=True</td>\n<td>alias=process2</td>\n</tr>\n<tr>\n<td>#
currently active process is
process2</td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td><a
href=\"#Switch Process\" class=\"name\">Switch
Process</a></td>\n<td>process1</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td>#
now active process is process
1</td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n</table>","name":"Switch
Process","shortdoc":"Switches active process into process with
`handle`."},{"args":"kill=True","doc":"<p>This keyword terminates all
processes started by the library.</p>","name":"Terminate All
Processes","shortdoc":"This keyword terminates all processes started by the
library."},{"args":"handle=None, kill=False","doc":"<p>This keyword
terminates process using either kill or terminate method.</p>\n<p>See <a
href=\"http://docs.python.org/2.7/library/subprocess.html\">subprocess</a>
module's <span class=\"name\">kill()</span> or <span
class=\"name\">terminate()</span>, which can be selected using <span
class=\"name\">kill</span> argument (by default <span
class=\"name\">terminate()</span> is used).</p>\n<p>Argument <span
class=\"name\">handle</span> is optional, if <span
class=\"name\">None</span> then the active process is
used.</p>\n<p>Examples:</p>\n<table border=\"1\">\n<tr>\n<td><a
href=\"#Terminate Process\" class=\"name\">Terminate
Process</a></td>\n<td></td>\n<td></td>\n<td># Terminates the active
process</td>\n</tr>\n<tr>\n<td><a href=\"#Terminate Process\"
class=\"name\">Terminate
Process</a></td>\n<td>${handle3}</td>\n<td></td>\n<td></td>\n</tr>\n<tr>\n<td><a
href=\"#Terminate Process\" class=\"name\">Terminate
Process</a></td>\n<td>${handle3}</td>\n<td>kill=True</td>\n<td># Using kill
instead of terminate</td>\n</tr>\n</table>","name":"Terminate
Process","shortdoc":"This keyword terminates process using either kill or
terminate method."},{"args":"handle=None","doc":"<p>Waits for process with
<span class=\"name\">handle</span> to terminate.</p>\n<p>Argument <span
class=\"name\">handle</span> is optional, if <span
class=\"name\">None</span> then the active process is used.</p>\n<p>Returns
an <a href=\"#ExecutionResult\" class=\"name\">ExecutionResult</a>
object.</p>\n<p>Examples:</p>\n<table
border=\"1\">\n<tr>\n<td>${output}=</td>\n<td><a href=\"#Wait For Process\"
class=\"name\">Wait For
Process</a></td>\n<td></td>\n</tr>\n<tr>\n<td>Should Be Equal As
Integers</td>\n<td>${output.exit_code}</td>\n<td>0</td>\n</tr>\n<tr>\n<td>Should
Match</td>\n<td>${output.stdout}</td>\n<td><span class=\"name\">*text in
the out*</span></td>\n</tr>\n<tr>\n<td>Should
Match</td>\n<td>${output.stderr}</td>\n<td></td>\n</tr>\n</table>","name":"Wait
For Process","shortdoc":"Waits for process with `handle` to
terminate."}],"name":"Process","named_args":true,"scope":"global","version":"trunk
20130515"};
</script>
<title></title>
</head>
=======================================
--- /src/robot/libraries/Process.py Tue May 28 02:34:01 2013
+++ /src/robot/libraries/Process.py Tue May 28 02:36:09 2013
@@ -418,7 +418,7 @@
return self._process(handle)
def switch_process(self, handle):
- """This keyword switches active process into process with `handle`.
+ """Switches active process into process with `handle`.
Examples:
--
---
You received this message because you are subscribed to the Google Groups "robotframework-commit" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.