aspose file tools*
The moose likes Jython/Python and the fly likes Using Jython script file inside App Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Languages » Jython/Python
Bookmark "Using Jython script file inside App" Watch "Using Jython script file inside App" New topic
Author

Using Jython script file inside App

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

I know how to embed Jython in a Java application. What I am wondering is if there is a fancy nice way to call a Jything script file from a java app. Or, if you just have to load the file the old fasioned way, and iterate through each line of the file and then using the interrpreter to execute that command.
Thanks.


GenRocket - Experts at Building Test Data
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Nevermind, found it
execfile(InputStream)
 
Consider Paul's rocket mass heater.
 
subject: Using Jython script file inside App