Actually let me add that in jython I don't need to always use
MyShell. It may be ok to wrapper it with some Jython class which then
delegates to MyShell. So something like
shell = MyJythonShell()
shell.grep (grep_args)
So MyJythonShell is defined in Jython which calls MyShell.
Am wondering how
Sorry for being a little vague. The last part of your response seems
like what I would need. So here are more details on what I am trying
to do.
I have an extensible command shell in java where commmand providers
plug in to supply new commands. I have a java class called MyShell
which has execC
jythonuser schrieb:
Hi
I am new to jythong and was wondering if/how I can do the following -
a) register a java object with a given name with jython interpreter
using set method
b) call methods on the java object - but the methods may not exist on
the object, so I would like to call from jython
Hi
I am new to jythong and was wondering if/how I can do the following -
a) register a java object with a given name with jython interpreter
using set method
b) call methods on the java object - but the methods may not exist on
the object, so I would like to call from jython a generic method that
eplace("\n", "").split(", ")
for name in method_names:
event_name = name.partition("_")[2]
event_name = "wx.EVT_" + event_name.upper()
exec("def " + name + "(self, e):\n" +
Dennis Kempin wrote:
> Chris schrieb:
>> On Feb 12, 9:38 pm, Dennis Kempin <[EMAIL PROTECTED]> wrote:
>>> Hello,
>>>
>>> I have a set of some objects. With these objects I want to call a Python
>>> method. But the writer of the method shall have the option to select
>>> from these objects as metho
Chris schrieb:
> On Feb 12, 9:38 pm, Dennis Kempin <[EMAIL PROTECTED]> wrote:
>> Hello,
>>
>> I have a set of some objects. With these objects I want to call a Python
>> method. But the writer of the method shall have the option to select
>> from these objects as method parameter.
>>
>> At the mome
On Feb 12, 9:38 pm, Dennis Kempin <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I have a set of some objects. With these objects I want to call a Python
> method. But the writer of the method shall have the option to select
> from these objects as method parameter.
>
> At the moment i use the following w
Hello,
I have a set of some objects. With these objects I want to call a Python
method. But the writer of the method shall have the option to select
from these objects as method parameter.
At the moment i use the following way to call a method with the a or b
or both parameter.
try:
meth
Daniel a écrit :
> Bruno Desthuilliers wrote:
>>> Another way is to use the 'types' module:
>> True - and that's somewhat cleaner since it doesn't expose the internals
>> of the descriptor protocol. OTHO, it can lead to strange results with
>> callables not implementing the descriptor protocol:
>
Bruno Desthuilliers wrote:
>
> > Another way is to use the 'types' module:
>
> True - and that's somewhat cleaner since it doesn't expose the internals
> of the descriptor protocol. OTHO, it can lead to strange results with
> callables not implementing the descriptor protocol:
Actually, the resu
Lawrence Oluyede a écrit :
> Bruno Desthuilliers <[EMAIL PROTECTED]>
> wrote:
>>> I agree that in general the solution explained by Alex and you is better.
>> They are not "better" - they are correct.
>
> Another way is to use the 'types' module:
True - and that's somewhat cleaner since it doesn'
Bruno Desthuilliers <[EMAIL PROTECTED]>
wrote:
> > I agree that in general the solution explained by Alex and you is better.
>
> They are not "better" - they are correct.
Another way is to use the 'types' module:
In [1]: class T(object):
...: pass
...:
In [2]: t = T()
In [3]: import
Daniel Nogradi a écrit :
(snip)
>> > def method_for_instance( message ):
>> >print message
>> >
>> > class myClass( object ):
>> >pass
>> >
>> > inst = myClass( )
>> > inst.method = method_for_instance
>> >
>> > inst.method( 'hello' )
(snip)
>> This won't work as expected:
>>
>> class Bidul
> >> I have an issue I think Python could handle. But I do not have the
> >> knowledge
> >> to do it.
> >>
> >> Suppose I have a class 'myClass' and instance 'var'. There is function
> >> 'myFunc(..)'. I have to add (or bind) somehow the function to the
> >> class, or
> >> the instance. Any help, i
Daniel Nogradi a écrit :
>> I have an issue I think Python could handle. But I do not have the
>> knowledge
>> to do it.
>>
>> Suppose I have a class 'myClass' and instance 'var'. There is function
>> 'myFunc(..)'. I have to add (or bind) somehow the function to the
>> class, or
>> the instance.
On Jul 10, 5:07 pm, "Daniel Nogradi" <[EMAIL PROTECTED]> wrote:
> > I have an issue I think Python could handle. But I do not have the knowledge
> > to do it.
>
> > Suppose I have a class 'myClass' and instance 'var'. There is function
> > 'myFunc(..)'. I have to add (or bind) somehow the function
> I have an issue I think Python could handle. But I do not have the knowledge
> to do it.
>
> Suppose I have a class 'myClass' and instance 'var'. There is function
> 'myFunc(..)'. I have to add (or bind) somehow the function to the class, or
> the instance. Any help, info or point of reference is
Hi guys.
I have an issue I think Python could handle. But I do not have the knowledge
to do it.
Suppose I have a class 'myClass' and instance 'var'. There is function
'myFunc(..)'. I have to add (or bind) somehow the function to the class, or
the instance. Any help, info or point of referenc
19 matches
Mail list logo