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

Discussion in 'Python' started by Ymtrader, Mar 15, 2011.

  1. Ymtrader

    Ymtrader Guest

    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)
    Ymtrader, Mar 15, 2011
    #1
    1. Advertising

  2. 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.
    Adam Tauno Williams, Mar 15, 2011
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Pere Montolio

    XML RPC to ONC XDR RPC

    Pere Montolio, Aug 11, 2004, in forum: XML
    Replies:
    0
    Views:
    701
    Pere Montolio
    Aug 11, 2004
  2. Gerson Kurz

    XML/RPC server with SSL in Python

    Gerson Kurz, Mar 22, 2005, in forum: Python
    Replies:
    2
    Views:
    401
  3. Michael

    Jabber/XML-RPC lib in Python?

    Michael, May 11, 2005, in forum: Python
    Replies:
    0
    Views:
    332
    Michael
    May 11, 2005
  4. Shirish Joshi

    Ruby and Sun-RPC or ONC-RPC ?

    Shirish Joshi, Apr 7, 2004, in forum: Ruby
    Replies:
    0
    Views:
    172
    Shirish Joshi
    Apr 7, 2004
  5. Vladimir Konrad

    rpc (not xml-rpc)

    Vladimir Konrad, Sep 2, 2005, in forum: Ruby
    Replies:
    5
    Views:
    125
    Austin Ziegler
    Sep 3, 2005
Loading...

Share This Page