Skip to content

Run WinPython Powershell Prompt with script argument #1063

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1michalS opened this issue Mar 10, 2022 · 1 comment
Open

Run WinPython Powershell Prompt with script argument #1063

1michalS opened this issue Mar 10, 2022 · 1 comment

Comments

@1michalS
Copy link

1michalS commented Mar 10, 2022

How to run WinPython Powershell with script argument ?
Normally powershell run with syntax like below. Somehow WinPython Powershell Prompt doesn't .
"D:\WPy64\WPy64\WPy64-31001\WinPython Powershell Prompt.exe" -noexit -file "D:\WPy64\WPy64\WPy64-31001\scripts\Script.ps1"

@firai
Copy link
Contributor

firai commented Mar 12, 2022

I believe WinPython Powershell Prompt.exe is just a thin wrapper around the batch file scripts\WinPython_Interpreter_PS.bat, which in turn calls the Powershell script scripts\WinPython_PS_Prompt.ps1 to set up the environment. As such, any arguments that you pass don't reach Powershell at all. Instead, arguments to WinPython Powershell Prompt.exe would probably need to be handled by both the batch file and the Powershell script that's being used. I'm not a regular batch/Powershell user, so I don't know if it's possible or even desirable to modify the batch and Powershell scripts to handle pass-through arguments.

Assuming that you're trying to script this rather than manually invoke your script within Powershell, the easiest workaround may be to create a Powershell script that first calls the WinPython Powershell script and then your Powershell script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants