Message965
I have a Java -Applications that starts different Python-
Interpreters with different System-States:
PythonInterpreter pi = new PythonInterpreter(null, new
PySystemState());
pi.exec("import codecs");
pi.exec("f = codecs.open(\"Test.java\",\"rb\", \"cp1252\")")
;
pi.exec("print f.readline()");
pi.cleanup();
pi = new PythonInterpreter(null, new PySystemState());
pi.exec("import codecs");
pi.exec("f = codecs.open(\"Test.java\",\"rb\", \"cp437\")");
pi.exec("print f.readline()");
pi.cleanup();
The second codec.open() fails with: LookupError:
unknown encoding cp437
If you debug the application, you see that the application
fails calling the PyFunction registered in org.python.core.
codecs. Is this because the function was registred with a
different system state?
Are mutiple systeme states in the same application
supported? |
|
| Date |
User |
Action |
Args |
| 2008-02-20 17:17:21 | admin | link | issue1159156 messages |
| 2008-02-20 17:17:21 | admin | create | |
|