From: <kco...@cf...> - 2002-12-19 20:04:11
|
I'm working on win2K with Jython 2.1 Is this possible? Can I execute a bat file from jython. If so, what am I doing wrong? *****script**** proc = Runtime.getRuntime().exec('cmd.exe /C SRCDIR.bat') proc.waitFor() brIn = BufferedReader(InputStreamReader(proc2.getInputStream())) while 1: line=brIn.readLine() if not line: break print line print brIn print os.environ.get('SRCDIR') proc.destroy() ***SRCDIR.bat**** set SRCDIR=%CD% echo %SCRDIR% |