Message965

Author kersam
Recipients
Date 2005-03-08.16:23:09
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
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?
History
Date User Action Args
2008-02-20 17:17:21adminlinkissue1159156 messages
2008-02-20 17:17:21admincreate