Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Python script xml-rpc to C# xml-rpc script

Reply
Thread Tools

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

 
 
Ymtrader
Guest
Posts: n/a
 
      03-15-2011
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 <upc>'
exit
else:
s = ServerProxy('http://www.upcdatabase.com/xmlrpc')
params = { 'rpc_key': rpc_key, 'upc': sys.argv[1] }
print s.lookup(params)
 
Reply With Quote
 
 
 
 
Adam Tauno Williams
Guest
Posts: n/a
 
      03-15-2011
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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing arguments to & executing, a python script on a remote machinefrom a python script on local machine ashish Python 4 09-20-2012 07:28 AM
Python as active script <script language=python> misterdi Python 0 07-28-2009 04:30 PM
How to Machine A python script execute Machine B python script? johnny Python 5 07-11-2007 01:03 PM
Executing a python script with arguments from a python script olaufr@gmail.com Python 3 12-13-2005 02:49 AM
executing a python script from another python script. sarmin kho Python 1 06-04-2004 01:12 PM



Advertisments