Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8982427
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T20:34:35+00:00 2026-06-15T20:34:35+00:00

How can I run a python script on server A that can add entries

  • 0

How can I run a python script on server A that can add entries to a list-item in another python script on server B? (Needs to be hyperefficient.)

Are there any easy solutions (or modules) that help with this?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T20:34:36+00:00Added an answer on June 15, 2026 at 8:34 pm

    I use xmlrpclib to call functions remotely.
    Make a function that appends values to a global array, then register the function with xmlrpclib and call it from machine B.

    It’s pretty easy to use. Here is a good starting point: http://docs.python.org/2/library/xmlrpclib.html#boolean-objects

    Made an example:

    #!/usr/bin/python
    from SimpleXMLRPCServer import SimpleXMLRPCServer
    import xmlrpclib
    
    arrayToAppend = []
    
    def appendArray(value):
        global arrayToAppend
        arrayToAppend.append(value)
        return 1
    
    def valueOfArray():
        return arrayToAppend
    
    server = SimpleXMLRPCServer(("localhost", 8000))
    print "Listening on port 8000..."
    server.register_function(appendArray, "appendArray")
    server.register_function(valueOfArray, "valueOfArray")
    server.serve_forever()
    

    Then test/use it like so

    >>> import xmlrpclib
    >>> p = xmlrpclib.Server("http://localhost:8000")
    >>> p.appendArray("test1")
    1
    >>> p.valueOfArray()
    ['test1']
    >>> p.appendArray("test2")
    1
    >>> p.valueOfArray()
    ['test1','test2']
    >>> 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to run a python script on my server (that python script has
I have a web server that can run python scripts, but I have no
Say I want to run a simple Python script that is a web server.
Can anybody help me how to run a python script through command line? My
Is there a secure Python intepreter? Imagine a Python VM you can run on
I've setup an Amazon EC2 server. I have a Python script that is supposed
I would like to write a script that will tell another server to SVN
I have a Rails server which will need to run a python script at
I am using phpseclib to ssh to my server and run a python script.
I have created a Python script that I want to run daily via a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.