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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:38:09+00:00 2026-05-26T14:38:09+00:00

Currently, I have an exe that I need to pass commands to thru python.

  • 0

Currently, I have an exe that I need to pass commands to thru python. The code worked when it was by itself. When I merged that snippet with my final program, it failed to work.

Basically, after the first two files upload using the program shell_start (upload is -f in the program i’m passing commands to), python decides to skip the final upload at the bottom with the program called shell_forward. The final upload of 3 files with the program shell_forward, doesn’t even work.

So, my main question, if you’re confused, is: why is it that when the program shell_start finishes uploading the two commands and files, the python shell won’t allow me to type anything in it? It acts like a command prompt window that won’t let you type anything into it after code is executed.

That is why I feel that a ctrl-c is needed to terminate shell_start.exe from the previous process, so python might let me type after it’s execution.

Here’s the code:

import os, time

name = raw_input("Input your name: ")
apn = raw_input("Input apn name: ")
ecid = raw_input("Input ecid name: ")
kernel = raw_input("Input kernel name: ")

os.system('shell_start.exe -f %s'%name)
time.sleep(1)
os.system('shell_start.exe -f %s'%apn)
time.sleep(1)

os.system('shell_forward.exe --imagefile myfile.img --ecid %(x)s --kernel %(y)s '% {"x" : ecid, "y" : kernel})
  • 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-26T14:38:10+00:00Added an answer on May 26, 2026 at 2:38 pm

    You may have better results by replacing the os.system calls with subprocess.

    The subprocess module allows you to spawn new processes, connect to
    their input/output/error pipes, and obtain their return codes. This
    module intends to replace several other, older modules and functions,
    such as:

    os.system
    os.spawn*
    os.popen*
    popen2.*
    commands.*
    

    See also PEP 324 – PEP proposing the subprocess module

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

Sidebar

Related Questions

I have some Python code that works correctly when I use python.exe to run
I currently have a log file(see bellow) that I need to iterate through and
I currently have an MS Access application that connects to a PostgreSQL database via
We currently have code like this: Dim xDoc = XDocument.Load(myXMLFilePath) The only way we
We have OSB services that are currently secured with a username and a password.
I have this assignment due that requires the usage of FLTK. The code is
I am have a powershell script that does a few things that all need
I have a Windows GUI application that's using the Qt framework (currently version 3.3.5,
I have some code that can spawn background worker threads from anywhere within it.
I have a product that does online backups using rdiff. What currently happens is:

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.