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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T08:16:54+00:00 2026-05-18T08:16:54+00:00

I have a Python application (command line tool running on a machine M1) that

  • 0

I have a Python application (command line tool running on a machine M1) that has input I1 and output O2. Also, I have a PHP application (website running on a machine M2) that feeds the Python application with input I1 and expects to read the output O1. My question is what’s the best approach to solve this problem? (the environment is GNU/Linux)

I was thinking at a solution with ssh; the PHP script executes a command via ssh: “ssh M2:./my_script.py arguments output_file” and transfers the output file “scp M2:output_file .” from M2 to M1. But, I don’t think this solution is elegant. I was thinking of web services (the Python application should expose a web service), but I’m not sure what’s the complexity of this solution or if it works.

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-05-18T08:16:55+00:00Added an answer on May 18, 2026 at 8:16 am

    Like others above, I’d do it by implementing a web service rather than fiddling with SSH. You’re right that the SSH solution is inelegant.

    The obvious answer for what to build your Python web application on top of: Django. If you want to use something lighter, look at a microframework like Flask.

    For data interchange, JSON is your best bet — supported by both Python and PHP now.

    • http://docs.python.org/library/json.html
    • http://php.net/manual/en/book.json.php
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a python application that relies on a file that is downloaded by
Long story short, I have a substantial Python application that, among other things, does
We have a Linux application that makes use of OpenSSL's Python bindings and I
I want to run javascript/Python/Ruby inside my application. I have an application that creates
I'm writing an application in Python that is going to have a lot of
I have a Python application in a strange state. I don't want to do
I'm thinking how to arrange a deployed python application which will have a Executable
Building a python application that converts raw audio files into wave using sox on
We have several Python 2.6 applications running on Linux. Some of them are Pylons
First, a little background : I have written a little application in python with

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.