Closed mxrch closed 1 year ago
Firstly be aware that what you're doing is scary stuff, it's not a good idea to execute random code that you receive over the network.
To answer your question, this is not a Pyro issue. It is likely due to the way you're calling exec
.
The default behavior is to execute the code in the local context.
You can give extra arguments to exec
to specify other scopes to run in.
I suggest you try exec(cmd, globals(), locals())
instead.
Closing this now, feel free to reopen if further questions arise.
Hi ! Thanks for this awesome project.\ I was wondering how could I set global variables client-side and reusing them later ? They seem to disappear at each call :
Server :
Client :
Server's code :
Client's code :