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 6730645
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:25:59+00:00 2026-05-26T10:25:59+00:00

Python 2.4.x (cannot install any non-stock modules). Question for you all. (assuming use of

  • 0

Python 2.4.x (cannot install any non-stock modules).

Question for you all. (assuming use of subprocess.popen)

Say you had 20 – 30 machines – each with 6 – 10 files on them that you needed to read into a variable.

Would you prefer to scp into each machine, once for each file (120 – 300 SCP commands total), reading each file after it’s SCP’d down into a variable – then discarding the file.

Or – SSH into each machine, once for each file – reading the file into memory. (120 – 300 ssh commands total).

?

Unless there’s some other way to grab all desired files in one shot per machine (files are named YYYYMMDD.HH.blah – range would be given 20111023.00 – 20111023.23). – reading them into memory that I cannot think of?

  • 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-05-26T10:26:00+00:00Added an answer on May 26, 2026 at 10:26 am

    Depending on the size of the file, you can possibly do something like:

    ...
    files= "file1 file2 ..."
    myvar = ""
    for tm in machine_list
             myvar = myvar+ subprocess.check_output(["ssh", "user@" + tm, "/bin/cat " + files]);
    ...
    

    file1 file2 etc are space delimited. Assuming all are unix boxes you can /bin/cat them all in one shot from each machine. (This is assuming that you are simply loading the ENTIRE content in one variable) variations of above.. SSH will be simpler to diagnose.

    At least that’s my thought.

    UPDATE

    use something like

             myvar = myvar+Popen(["ssh", "user@" +tm ... ], stdout=PIPE).communicate()[0]
    

    Hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Python 2.4.x - I cannot install any non-standard modules. *nix environment. So I've got
Here tis the error I get while trying to install MySQL-python-1.2.3. any idea's? Traceback
I have used this question to learn install my python script as a service
NumPy installer can't find python path in the registry. Cannot install Python version 2.6
I am playing with Google App Engine and Python and I cannot list the
I cannot get the example Python programs to run. When executing the Python command
Using python 2.4 and the built-in ZipFile library, I cannot read very large zip
Maybe it's just doesn't exist, as I cannot find it. But using python's logging
Python for Unix and Linux System Administration is aimed at sysadmins. Any other favorites
I'm trying to install lxml, on an Ubuntu server running Python 2.6 (in 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.