Message3929
It is no longer possible to create a file object from a Java
InputStream. This last worked for me in 2.5a1.
Simple test:
from __future__ import with_statement
from java.io import FileInputStream as FIS
from org.python.core import PyFile
with open("in.txt","w") as f:
f.write("spam!\n")
# Neither constructor works
PyFile(FIS("in.txt"))
file(FIS("in.txt"))
Fails with:
Traceback (most recent call last):
File "filestream.py", line 10, in <module>
PyFile(FIS("in.txt"))
TypeError: coercing to Unicode: need string, 'javainstance' type found |
|
Date |
User |
Action |
Args |
2008-12-15 19:59:15 | kam | set | recipients:
+ kam |
2008-12-15 19:59:15 | kam | set | messageid: <1229371155.79.0.9930873406.issue1204@psf.upfronthosting.co.za> |
2008-12-15 19:59:15 | kam | link | issue1204 messages |
2008-12-15 19:59:15 | kam | create | |
|