⇤ ← Revision 1 as of 2008-11-12 18:16:34
555
Comment:
|
561
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
You can no longer do PyFile(inputStream) directly from Jython code. This is because a PyFile that gets an inputStream needs to know the encoding of the stream in order to work, so that the recommended approach is to replace code like: | You can no longer do `PyFile`(inputStream) directly from Jython code. This is because a `PyFile` that gets an `InputStream` needs to know the encoding of the stream in order to work, so that the recommended approach is to replace code like: |
Line 5: | Line 6: |
Line 10: | Line 10: |
Line 13: | Line 14: |
You can no longer do PyFile(inputStream) directly from Jython code. This is because a PyFile that gets an InputStream needs to know the encoding of the stream in order to work, so that the recommended approach is to replace code like:
from java.io import FileInputStream from org.python.core import PyFile fis = FileInputStream("error.txt") pyf = FileUtil.wrap(fis)
with code like:
from java.io import FileInputStream from org.python.core.util import FileUtil fis = FileInputStream("error.txt") pyf = FileUtil.wrap(fis)