/bundles/plugins-trunk/Console/console/commands/python.xml
XML | 41 lines | 31 code | 9 blank | 1 comment | 0 complexity | 3101b25743bd49cff01e06952beccc46 MD5 | raw file
Possible License(s): BSD-3-Clause, AGPL-1.0, Apache-2.0, LGPL-2.0, LGPL-3.0, GPL-2.0, CC-BY-SA-3.0, LGPL-2.1, GPL-3.0, MPL-2.0-no-copyleft-exception, IPL-1.0
1<?xml version="1.0" ?>
2
3<!DOCTYPE COMMANDO SYSTEM "commando.dtd">
4
5<COMMANDO>
6 <UI>
7 <CAPTION LABEL="Application settings">
8 <ENTRY LABEL="Script Name" VARNAME="scriptname"
9 EVAL="buffer.getPath()" />
10
11 <ENTRY LABEL="Application parameters" VARNAME="args" />
12
13 </CAPTION>
14
15 </UI>
16
17 <COMMANDS>
18 <!-- Change to dir of current open buffer -->
19 <COMMAND SHELL="System" CONFIRM="FALSE">
20 fSep = java.lang.System.getProperties().getProperty("file.separator");
21 buf = new StringBuffer("cd ");
22 buf.append(buffer.getPath().substring(0, buffer.getPath().lastIndexOf(fSep)));
23 buf.append(fSep);
24 buf.toString();
25 </COMMAND>
26
27
28 <COMMAND SHELL="System" CONFIRM="FALSE">
29 buf = new StringBuffer();
30 buf.append("python " + scriptname);
31 if(!args.equals(""))
32 {
33 buf.append(' ');
34 buf.append(args);
35 }
36
37 // return value
38 buf.toString();
39 </COMMAND>
40 </COMMANDS>
41</COMMANDO>