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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T02:02:32+00:00 2026-06-05T02:02:32+00:00

So i am running into a problem using subprocess.call() and i think i may

  • 0

So i am running into a problem using subprocess.call() and i think i may just be calling it wrong. I am using:

subprocess.call('testingosfile.py')

and i get the traceback:

Traceback (most recent call last):
  File "<pyshell#14>", line 1, in <module>
    subprocess.call('testingosfile.py')
  File "C:\Python27\lib\subprocess.py", line 493, in call
    return Popen(*popenargs, **kwargs).wait()
  File "C:\Python27\lib\subprocess.py", line 679, in __init__
    errread, errwrite)
  File "C:\Python27\lib\subprocess.py", line 893, in _execute_child
    startupinfo)
WindowsError: [Error 193] %1 is not a valid Win32 application

and the contents of testingosfile.py is:

print "hello world!"
raw_input('....')

how do i manage to get this running?

Thank you in advance for your replies.

  • 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-05T02:02:37+00:00Added an answer on June 5, 2026 at 2:02 am

    The error message makes perfect sense – with subprocess, you can only start an executable. So, to fix it, you should start an executable. Specifically, you should start the Python interpreter and tell it to run your script. Something like

    subprocess.call(['python.exe', 'testingosfile.py'])
    

    should work, although you might have to provide the full path to the Python interpreter (I can’t test at the moment).

    However, have you considered importing testingosfile.py instead? Whenever you import a Python script, all the commands in that script are run. Using

    import testingosfile
    

    inside a function in order to execute the commands would be poor style, but you could package up the useful commands of testingosfile.py into some function. Then, you could use

    import testingosfile
    

    at the top of your main script, and just call that function whenever you want to print Hello World and get the user’s input.

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

Sidebar

Related Questions

I remember running into this problem when I started using OpenGL in OS X.
I'm running into a problem with large POST data (>16384 bytes) when using Django
I am running into a problem that just doesn't seem right. I've got a
I'm running into this problem when trying to call a SOAP Web Service from
I'm using a Datagrid from the WPFtoolkit and am running into a problem with
Been running into a problem ever since I started using rvm to manage my
I am running into a problem which I am using C Dll into my
I am running into a problem. I was using: $(this).parents(tr:first).remove(); to delete the row
I am running into a problem with Ajax and C# asp.net. I am using
I'm debugging an Oracle package using PL/SQL developer, but I'm running into a problem

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.