|
From: Bent A. S. <be...@be...> - 2003-08-05 10:51:25
|
Hi Sachin, You can still use Runtime.exec from Jython: ### from java.io import * import java.lang.Runtime as Runtime r = Runtime.getRuntime() p = r.exec("ls -al") i = p.getInputStream() isr = InputStreamReader(i) br = BufferedReader(isr) s = br.readLine() while s: print s s = br.readLine() ### hope this helps! :) regards /Bent > -----Original Message----- > From: jyt...@li... > [mailto:jyt...@li...] On Behalf > Of Sachin G. Pawar > Sent: 5. august 2003 11:35 > To: jyt...@li... > Subject: [Jython-users] Execute a batch file from Jython script > > > Hi All, > > How can I execute a batch file from a jython script? > > I am looking for a functionality similar to Runtime().exec( > "cmd" ) which is available in Java. > > Thanks & Regards > Sachin G. Pawar > > ********************************************************* > Disclaimer > > This message (including any attachments) contains > confidential information intended for a specific > individual and purpose, and is protected by law. > If you are not the intended recipient, you should > delete this message and are hereby notified that > any disclosure, copying, or distribution of this > message, or the taking of any action based on it, > is strictly prohibited. > > ********************************************************* > > Visit us at http://www.mahindrabt.com > > > > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites > including Data Reports, E-commerce, Portals, and Forums are > available now. Download today and enter to win an XBOX or > Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet _072303_01/01 _______________________________________________ Jython-users mailing list Jyt...@li... https://lists.sourceforge.net/lists/listinfo/jython-users |