From: Finn B. <bc...@us...> - 2000-12-01 19:23:45
|
Update of /cvsroot/jython/jython/org/python/modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv11335 Modified Files: os.java Log Message: Add a __file__ attribute to the "os" module. This is mostly a hack, but it allow the site.py module from CPython2.0 to be used with jython. Index: os.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/modules/os.java,v retrieving revision 2.2 retrieving revision 2.3 diff -C2 -r2.2 -r2.3 *** os.java 2000/10/10 14:37:15 2.2 --- os.java 2000/12/01 19:23:43 2.3 *************** *** 6,9 **** --- 6,14 ---- public class os implements ClassDictInit { public static String[] __depends__ = new String[] {"javaos", }; + + // An ugly hack, but it keeps the site.py from CPython2.0 happy + + public static String __file__ = + Py.getSystemState().prefix.toString() + "/Lib/javaos.py"; public static void classDictInit(PyObject dict) { |