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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T09:54:19+00:00 2026-05-11T09:54:19+00:00

I am trying to use os.system() to call another program that takes an input

  • 0

I am trying to use os.system() to call another program that takes an input and an output file. The command I use is ~250 characters due to the long folder names.

When I try to call the command, I’m getting an error: The input line is too long.

I’m guessing there’s a 255 character limit (its built using a C system call, but I couldn’t find the limitations on that either).

I tried changing the directory with os.chdir() to reduce the folder trail lengths, but when I try using os.system() with '..\folder\filename' it apparently can’t handle relative path names. Is there any way to get around this limit or get it to recognize relative paths?

  • 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. 2026-05-11T09:54:20+00:00Added an answer on May 11, 2026 at 9:54 am

    You should use the subprocess module instead. See this little doc for how to rewrite os.system calls to use subprocess.

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

Sidebar

Related Questions

I'm trying to use System.IO.File.Replace to update a file, and it's throwing System.IOException if
I'm trying to use .Net serialport methods from another program which uses Unity3D engine.
I've been trying to use the system call ptrace (using the PTRACE_SINGLESTEP macro) to
I'm trying to use System.DirectoryServices in a web site project and I'm getting this
I'm trying to learn advanced sql and how to use system queries (sql server).
I'm trying to use the code below to send messages via System.Net.Mail and am
I currently use VS 2008 Professional, but I'm trying to get Team System Developer
I have a program I'm trying to compile, lets call it P. P needs
I am trying to upload a file to some url using ssl. I use
I am trying to use Python (through Django framework) to make a Linux command

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.