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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T18:49:32+00:00 2026-06-07T18:49:32+00:00

I am developing a program which needs to use os.system because of the old

  • 0

I am developing a program which needs to use os.system because of the old Python limitations. Currently I’m stuck in one small spot.

os.system("C:\\FIOCheck\\xutil.exe  -i get phy" +HBEA + ">C:\\FIOCheck\\HBEAResult.txt")

This is the piece of code I am trying to work through. It will access an external program, which has some parameters. HBEA is the variable I am trying to pass (which is received earlier in the program). The program then takes whatever the .exe created and pipes it to an external file. At this point, the variable HBEA is not being passed to the command line, so the .exe never runs, which causes the .txt to be blank. Since the file is blank, I cannot grab data from it and therefore cannot complete the program.

Any ideas?

EDIT:
So I attempted the following code per some suggestions:

cmd = "C:\\FIOCheck\\xutil.exe  -i get phy " +HBEA + ">C:\\FIOCheck\\HBEAResult.txt"
print cmd
os.system(cmd)

The following output was generated:

50012BE00004BDFF  #HBEA variable
C:\FIOCheck\xutil.exe  -i get phy 50012BE00004BDFF>C:\FIOCheck\HBEAResult.txt #the cmd  var

However this still isn’t passing the value through. Is the HBEA variable too long?

SOLVED

This program worked with some editing from the best answer. The commands were passing correctly, however the way I formatted it was not correct. The new formatting looks like:

cmd = "C:\\FIOCheck\\xutil.exe -i " + HBEA + " get ver" + ">C:\\FIOCheck\\HBEAResult.txt"
os.system(cmd)

Thanks for the help!

  • 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-07T18:49:34+00:00Added an answer on June 7, 2026 at 6:49 pm
    os.system("C:\\FIOCheck\\xutil.exe  -i get phy" +HBEA + ">C:\\FIOCheck\\HBEAResult.txt")
    

    should that be

    os.system("C:\\FIOCheck\\xutil.exe  -i get phy " +HBEA + ">C:\\FIOCheck\\HBEAResult.txt")
    

    and you can always build the string first

    cmd = "C:\\FIOCheck\\xutil.exe  -i get phy " +HBEA + ">C:\\FIOCheck\\HBEAResult.txt"
    print cmd
    os.system(cmd)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing a simple program which makes a Python script executable, and I'm working
I am developing a small scale patient record program. One of the functionalities they
I'm developing a program which allows users to input some information which then gets
I am developing some program in C# which will send the mail using outlook
I am developing a windows CE program for the Motorola MC9090G which is running
I am currently developing a program that uses C#'s Dictionary container (specifically, SortedDictionary). This
I am developing program which need to interact with COM ports. By learning from
I am currently developing an application for some researchers in my university.It's a small
We are developing an application which accesses an API exposed over some embedded system.
I am developing a program in which I need to generate a random number

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.