Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- test.py
- -------
- import Test
- class TargetClass(object):
- def _getattribute(self):
- return self.__attribute
- def _setattribute(self, value):
- self.__attribute = value
- attribute = property(_getattribute, _setattribute)
- target = TargetClass()
- test = Test(target=target)
- test.value = ('bleh', 'blah')
- print target.attribute
- Test.java
- ---------
- import org.python.core.PyObject;
- public class Test {
- public PyObject target;
- public void setValue(PyObject value) {
- target.__setattr__("attribute", value);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement