Amortya, Oliver,

There's function teleportation which passes functions by value (byte code).
See
http://rpyc.readthedocs.org/en/latest/api/utils_classic.html#rpyc.utils.classic.teleport_function

-Tomer
 On Jul 19, 2014 8:22 AM, "Oliver Drake" <[email protected]> wrote:

> Just off the top of my head, you could get the source code of the
> function, pass that as a string to the remote server and then execute it
> with exec or eval?
> See the inspect module for help getting the source code of your function.
> As long as you don't care about speed or security this approach might do
> the trick ;)
> Cheers,
> Oli
>
>
> On 19 July 2014 10:20, Amortya Ray <[email protected]> wrote:
>
>> Hi,
>>
>> I'm trying to encapsulate a whole bunch of logic into one Python function
>> and pass that as an argument to remote RPyC method where I want to execute
>> it on the server. But RPyC treats the function as a callback and execute it
>> locally. Is there a way around that? Can I force the server to execute it
>> on the server instead of on the client?
>>
>> Thank you.
>>
>> --
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "rpyc" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "rpyc" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"rpyc" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to