0

Until yesterday I used to be perfectly able to run python scripts in python like so -

start python [python_script_name]

However by now, (in this span of time, I have installed GitHub, gotten stuck in booting Windows 7 and forced to use Windows Restore which removed GitHub and now Windows 7 boots) I can only use

start python.exe [python_script_name]

Can anyone tell me what's going on here?

[Python version - 2.7.5 Windows 7 Home]

1 Answer 1

1

start is a command built into cmd.exe, not PowerShell.exe. In PowerShell, start is a default alias for the Start-Process cmdlet, which operates differently than the start command in cmd.exe.

In PowerShell, you'll want to use a command like:

Start-Process -FilePath c:\path\to\python.exe -ArgumentList 'c:\path\to\script.ps1' -Wait -NoNewWindow;
Sign up to request clarification or add additional context in comments.

2 Comments

you probably meant ...\script.py?
Yeah, or that. Whoopsie :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.