[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz/gzz/control Main.java
From: |
Tuukka Hastrup |
Subject: |
[Gzz-commits] gzz/gzz/control Main.java |
Date: |
Tue, 27 Aug 2002 02:34:41 -0400 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Tuukka Hastrup <address@hidden> 02/08/27 02:34:41
Modified files:
gzz/control : Main.java
Log message:
doc
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/control/Main.java.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
Patches:
Index: gzz/gzz/control/Main.java
diff -c gzz/gzz/control/Main.java:1.3 gzz/gzz/control/Main.java:1.4
*** gzz/gzz/control/Main.java:1.3 Mon Aug 26 15:07:15 2002
--- gzz/gzz/control/Main.java Tue Aug 27 02:34:41 2002
***************
*** 4,14 ****
import org.python.util.PythonInterpreter;
import org.python.core.*;
public class Main {
public static void main(String[] args) throws PyException {
String[] pyargs = new String[args.length+1];
System.arraycopy(args, 0, pyargs, 1, args.length);
! pyargs[0] = "Gzz.py";
System.setProperty("python.path",
System.getProperty("java.class.path"));
PythonInterpreter.initialize(System.getProperties(), null, pyargs);
--- 4,19 ----
import org.python.util.PythonInterpreter;
import org.python.core.*;
+ /** A wrapper class for starting Gzz.py from Java. This class can be used
+ * as the main class in gzz.jar
+ */
+
public class Main {
public static void main(String[] args) throws PyException {
String[] pyargs = new String[args.length+1];
System.arraycopy(args, 0, pyargs, 1, args.length);
! pyargs[0] = "Gzz.py"; // sys.argv[0] is the command name
! // Python search path will be the same as Java classpath
System.setProperty("python.path",
System.getProperty("java.class.path"));
PythonInterpreter.initialize(System.getProperties(), null, pyargs);