<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
<div><br></div><div>I have a socket set up between a client and server program.  Let's say that I serialize (pickle) some data in the client and send it to the server with the intention of calling a function in the server to process the data.  How would one execute the function?  This is not for a web-based application, BTW -- it's a desktop based application</div><div><br></div><div>My current thought process is (using a generalized example):</div><div><br></div><div>I have a list of numbers in the client and want to find the length of the list using the server.  There exists a function find_len() in the server code.  I have a list of numbers [1,2,3].  On the client side, I create the tuple ("find_len", [1,2,3]), and serialize it.  I pass this serialized object via a socket to the server, which unpickles it.  The server takes the key (find_len) and uses a getattr call to get the find_len function.  The server then calls find_len([1,2,3]) to get the sum.</div><div><br></div><div>def find_len(list_):</div><div>    return</div><div><br></div><div>Are there better ways of accomplishing this (I'm aware that there are security pitfalls here...)</div><div><br></div><div><br></div>                                     <br /><hr />Windows 7: It works the way you want. <a href='http://www.microsoft.com/Windows/windows-7/default.aspx?ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_evergreen2:102009' target='_new'>Learn more.</a></body>
</html>