Re: Python script xml-rpc to C# xml-rpc script

2011-03-15 Thread Adam Tauno Williams
On Tue, 2011-03-15 at 08:00 -0700, Ymtrader wrote:
> If anyone is fluent in python as well as C# using the cook computing
> xml-rpc.net library I could really use some help.  I have been trying
> to write a C# program to access upcdatabase.com without much luck. 

Yes,  I've used both.

>  have a working python script. Would anyone be willing to show me the
> C# equivalent to this python script might be. Thank you

If you ask on an appropriate forum - yes.  [the cook computing forum or
the Mono list].  This is *not* a Python question.

-- 
http://mail.python.org/mailman/listinfo/python-list


Python script xml-rpc to C# xml-rpc script

2011-03-15 Thread Ymtrader
If anyone is fluent in python as well as C# using the cook computing 
xml-rpc.net library I could really use some help.  I have been trying to write 
a C# program to access upcdatabase.com without much luck. I have a working 
python script. Would anyone be willing to show me the C# equivalent to this 
python script might be. Thank you

#!/usr/bin/env python
#
#

import sys
from xmlrpclib import ServerProxy, Error

rpc_key = 'enter rpc_key here'

if __name__=='__main__':
if len(sys.argv) != 2:
print 'Usage: fetchupc.py '
exit
else:
s = ServerProxy('http://www.upcdatabase.com/xmlrpc')
params = { 'rpc_key': rpc_key, 'upc': sys.argv[1] }
print s.lookup(params)
-- 
http://mail.python.org/mailman/listinfo/python-list