Read and respond to this message at: https://sourceforge.net/forum/message.php?msg_id=7276426 By: bewa
Hello everyone, I am currently building an eclipse plugin where I wish to keep multiple python files in a hierarchical structure, i.e. grouped in folders. Now my concern is how to launch them. I could launch each file manually and give the file the arguments by hand, but that will be too much work. I would like to have it in a way that I write a function to read the arguments from a text-file and then launch each .py-file in a specified folder programmatical. Like this: launch(IFile pyFile, String args) I have found an article on how to launch java-programs (http://www.eclipse.org/articles/Article-Java-launch/launching-java.html), where I found this snippet: ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager(); ILaunchConfigurationType type = manager.getLaunchConfigurationType(ID_JAVA_APPLICATION); Now my first question is, which String Constant would I have to use to get the LaunchConfigurationType applicable for python? If you know a better way like reading a *.launch-file from the project folder after manipulating the arguments stored therein, let me know. Further snippets deal with setting details of the LaunchConfiguration like classpath, I do not think this will be a big problem. The last thing is actually runnig the python file, which sould go well with ILaunchConfiguration configuration = workingCopy.doSave(); DebugUITools.launch(configuration, ILaunchManager.RUN_MODE); given that the file itself is stored in the configuration. And here is my second question: Does this approach make sense or do you know of any detail I missed? Any help is greatly appreciated! Bewa ______________________________________________________________________ You are receiving this email because you elected to monitor this forum. To stop monitoring this forum, login to SourceForge.net and visit: https://sourceforge.net/forum/unmonitor.php?forum_id=293649 ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensign option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ Pydev-users mailing list Pydev-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pydev-users