From: Finn B. <bc...@us...> - 2001-02-22 13:04:30
|
Update of /cvsroot/jython/jython/org/python/util In directory usw-pr-cvs1:/tmp/cvs-serv24066 Modified Files: jython.java Log Message: Added the -W warning option. Index: jython.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/util/jython.java,v retrieving revision 2.16 retrieving revision 2.17 diff -C2 -r2.16 -r2.17 *** jython.java 2000/12/15 22:21:02 2.16 --- jython.java 2001/02/22 13:05:32 2.17 *************** *** 19,22 **** --- 19,23 ---- "-jar jar : program read from __run__.py in jar file\n"+ "-c cmd : program passed in as string (terminates option list)\n"+ + "-W arg : warning control (arg is action:message:category:module:lineno)\n"+ "file : program read from script file\n"+ "- : program read from stdin (default; interactive mode if a "+ *************** *** 97,100 **** --- 98,106 ---- //System.err.println("imp"); + for (int i = 0; i < opts.warnoptions.size(); i++) { + String wopt = (String) opts.warnoptions.elementAt(i); + PySystemState.warnoptions.append(new PyString(wopt)); + } + String msg = ""; if (Options.importSite) { *************** *** 195,198 **** --- 201,205 ---- public java.util.Properties properties; public String command; + public java.util.Vector warnoptions = new java.util.Vector(); public CommandLineOptions() { *************** *** 258,261 **** --- 265,272 ---- command = args[++index]; if (!fixInteractive) interactive = false; + break; + } + else if (arg.equals("-W")) { + warnoptions.addElement(args[++index]); break; } |