cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the output from start proccess Utility

NavathaMallappa
Level 2
Hi ,   I am running my python program using Utility-Environment, but i want to store the output of that program in a datatime. Could you please assist with the steps to do that, i have tried adding an output variable in start process utility but it didnt worked.   Regards, Navatha
2 REPLIES 2

MelissaSuarez_G
Level 6
You will have to create a separate Business Object for the IDLE that you are using to run the python script. Another option is that you could modify your python script to generate a txt file with the output, and then use Blue Prism to read that file.

John__Carter
Staff
Staff
Try pasting this into a code stage. The inputs are in bold. Dim p As System.Diagnostics.Process Dim s As System.Diagnostics.ProcessStartInfo Dim r As System.IO.StreamReader If Arguments"""" Then   s = New System.Diagnostics.ProcessStartInfo(Application, Arguments) Else   s = New System.Diagnostics.ProcessStartInfo(Application) End If If Working_Folder"""" Then  s.WorkingDirectory = Working_Folder End If s.UseShellExecute = False s.RedirectStandardOutput = True s.createNoWindow = True p = New System.Diagnostics.Process() p.StartInfo = s p.Start() r = p.StandardOutput If Time_Out>0 AndAlso p.WaitForExit(1000*Time_Out)=False Then  Throw New System.Exception(""Failed waiting for application to end"") End If Output = r.ReadToEnd()