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

  • Home
  • SEARCH
  • 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 7628629
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:37:38+00:00 2026-05-31T05:37:38+00:00

I have two utilities written in C++, TCP/IP server and client that I have

  • 0

I have two utilities written in C++, TCP/IP server and client that I have used for years.
Server opens designated file and waits for client to connect. After connection has been established the server starts to send file’s content. The client receives it and saves in a file.
Now, I want to write a python script to start both application and wait for them to finish. After that script will do some other work. It is written for Windows.
It is my first script in python. And my first problem is that I can see that both applications have started and connected to each other. I can see it because two DOS windows appears and show messages that inform me about connection.
However, I don’t see a file, which has to be created by the client. What is wrong. Code is very simple and follows.

import subprocess 

p = subprocess.Popen('C:\MyProjects\exes\FeedSender_exe\FeedSender.exe C:\MyProjects\exes\FeedSender_exe\FeedSender.ini') 
print "Start1"
p1 = subprocess.Popen('C:\MyProjects\exes\FeedReaderFileProcessor\FeadReaderi41.exe C:\MyProjects\exes\FeedReaderFileProcessor\Config.ini') 
print "Start2"

for line in p.stdout.readlines(): 
    print line, 
retval = p.wait()
print "Finish1"
retval = p1.wait() 
print "Finish2"
  • 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-31T05:37:39+00:00Added an answer on May 31, 2026 at 5:37 am

    It will probably help to set the subprocess’s current working directory.

    p = subprocess.Popen(r'C:\MyProjects\exes\FeedSender_exe\FeedSender.exe C:\MyProjects\exes\FeedSender_exe\FeedSender.ini',
            cwd=r'C:\MyProjects\exes\FeedSender_exe')
    

    Depending on how you set up your programs, the output file should show up in C:\MyProjects\exes\FeedSender_exe. I obviously can’t get your programs, so I can’t test this.

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

Sidebar

Related Questions

I have two SSIS Solutions SolutionA Contains one utilities package that handles all emails
I've written a simple Application that utilizes WCF to communicate between client and server.
I have two classes. package utilities; public class PostCaller { public String getUrl() {
I have two application that need to talk to each other. App1 needs to
We have a macro for signalling errors in a common utilities library that goes
I want to write two simple utilities: Receives a Binary file, and converts it
I have downloaded two file form poin2 to listing property and i have to
I have an Excel plug-in (written in C#) with a static variable that is
I have two projects in a workspace, one is a fancy application that is
Have two separate databases. The master that holds the user information(username, password, address etc.).

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.