Message546
The __str__() method of the isql.Prompt class isn't
magicly called when sys.stdout.write(self.prompt) is
called. It result in a stacktrace:
Jython 2.1 on java1.3.0 (JIT: null)
Type "copyright", "credits" or "license" for more
information.
>>> import dbexts, isql
>>> d=3Ddbexts.dbexts("prod_sport")
>>> D=3Disql.IsqlCmd(d)
>>> D.use_rawinput=3D0
>>> D.cmdloop()
Traceback (innermost last):
File "<console>", line 1, in ?
File "/usr/local/jython/jython-2.1/Lib/cmd.py", line
79, in cmdloop
TypeError: write(): 1st arg can't be coerced to String
I'm not sure that this have ever worked. Adding a
__tojava__ method to the Prompt class seems to fix the
problem.
def __tojava__(self, cls):
if cls == java.lang.String:
return self.__str__()
return None
|
|
Date |
User |
Action |
Args |
2008-02-20 17:16:59 | admin | link | issue499973 messages |
2008-02-20 17:16:59 | admin | create | |
|