Differences between revisions 2 and 3
Revision 2 as of 2008-11-12 18:18:21
Size: 561
Comment:
Revision 3 as of 2008-11-12 22:41:05
Size: 554
Comment:
Deletions are marked like this. Additions are marked like this.
Line 7: Line 7:
pyf = FileUtil.wrap(fis) pyf = PyFile(fis)

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 = PyFile(fis)

with code like:

from java.io import FileInputStream
from org.python.core.util import FileUtil
fis = FileInputStream("error.txt")
pyf = FileUtil.wrap(fis)

Jython25BackwardsIncompatibilities (last edited 2008-11-23 17:56:15 by astound-69-42-4-166)