Message6168

Author zyasoft
Recipients spider, zyasoft
Date 2010-10-15.14:01:13
SpamBayes Score 1.9691101e-06
Marked as misclassified No
Message-id <1287151275.64.0.10061301125.issue1663@psf.upfronthosting.co.za>
In-reply-to
Content
I can't reproduce this problem on Jython trunk. Here's what I tried:

>>> import dh    
>>> import sys
>>> h = dh()
>>> h.hook("hi")
Hooked<<<hi>>>
>>> sys.displayhook = h.hook
>>> "foo"                   
Hooked<<<foo>>>
>>> sys.displayhook = dh.static_hook
>>> "foo"                           
Hooked<<<foo>>>

This is the dh class:

import org.python.core.PyObject;

public class dh {

    public dh() {}

    public static void static_hook(PyObject o) {
        System.out.println("Hooked<<<" + o + ">>>");
    }

    public void hook(PyObject o) {
        System.out.println("Hooked<<<" + o + ">>>");
    }
    
}

So that all looks good to me.

Please submit a test case (in either JUnit or PyUnit, see our test cases for examples) and reopen if you're still experiencing a problem. I did take a look at the possibility of downloading  and running GDA, but that's just too big of a project.
History
Date User Action Args
2010-10-15 14:01:15zyasoftsetmessageid: <1287151275.64.0.10061301125.issue1663@psf.upfronthosting.co.za>
2010-10-15 14:01:15zyasoftsetrecipients: + zyasoft, spider
2010-10-15 14:01:15zyasoftlinkissue1663 messages
2010-10-15 14:01:14zyasoftcreate