Capturing a Return Code?
pr144 via Jython-users <[email protected]> Sun, 12 Aug 2018 10:58:14 -0400
| Newsgroups | gmane.comp.lang.jython.user |
|---|---|
| Message-ID | <[email protected]> |
I am running a Powershell script that executes a Task Manger scheduled job on a different Windows Server from the Jython script. I am having a problem capturing the return value, the Powershell scripts takes about 1-2 minutes, this is the code, pipe = subprocess.Popen(['powershell.exe', 'MY_SCRIPT.ps1',stdout=sys.stdout] This doesn't work, (it returns before Pwershell script completes), pipe.communicate() This just leaves the the Jython script running at the command prompt until I kill it, retCode=pipe.wait() What are the best options? Thank you, PR ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Jython-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jython-users