result object with rc0

212 views
Skip to first unread message

supriya s

unread,
Jul 12, 2020, 10:09:48 PM7/12/20
to robotframework-users
Hi all,
I had implemented small functionality in Python file.
----------------------
import os
import shutil
import sys
n1=15
n2=10
sum=n1+n2
print(sum)
-----------------------
I Run Python file in robot framework (RIDE).
${result}=   Run Process    Python    D:\\Second.py     alias=first
Log     ${result.rc}=
Log     ${result.stdout}=
should be equal    ${result.stdout}    25
${effect}     get Process Result     first
${object}    get Process Object     first
-------------
In Run window i can see following output
Waiting for process to complete
Process completed
${result} = <result object with rc 0>
0=
25=
=
${effect}   <result object with rc 0>
${object}  <result object with rc 0>

------------
i have doubt in following
1)<result object with rc 0> what it means
2)how result.rc is printing 0
3)how get process result,get process object also printing result with object rc0
could you please help in identifying these
 

Pekka Klärck

unread,
Jul 13, 2020, 4:46:09 AM7/13/20
to supriyal...@gmail.com, robotframework-users
Hi,

These questions ought to be answered by Process library documentation:
http://robotframework.org/robotframework/latest/libraries/Process.html

Depending on your use case you should also consider turning your
Python code into a library instead of running it as a script.

Cheers,
.peke
> --
> You received this message because you are subscribed to the Google Groups "robotframework-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/robotframework-users/ddb23e1c-b6dd-4d96-999e-0907a0d9ec5bo%40googlegroups.com.



--
Agile Tester/Developer/Consultant :: http://eliga.fi
Lead Developer of Robot Framework :: http://robotframework.org
Reply all
Reply to author
Forward
0 new messages