-
Notifications
You must be signed in to change notification settings - Fork 317
Create PowerShell shortcut similar to "WinPython Command Prompt.exe" #209
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
Comments
That is the problem of PowerShell: if you create an user application requiring PowerShell, it will be non-executable to 95% of the intended users. I'm interesting myself in the What do you think of xonsh ? |
Yeah, PowerShell can be kinda lame for non-admins. I've never heard of xonsh, but I did just look it up. Looks kinda interesting, but I doubt that I'd use it. I'd say it would be a good addition, but I wouldn't replace CMD with it. |
to reconsider when Windows users will be 50% on Windows 10, this summer 2016 |
Let suppose:
Then:
|
@dougthor42 what should contain |
@stonebig Can you elaborate? I'm not sure I understand the question. What do you mean by "what should contain"? |
well, let's take a current ".bat" launcher, "winpython.bat":
What should I modify to get a powershell one ? (trying to experiment how to do your whish) |
Ah, ok. So I think we may be talking about two different things. Please let me know if that's not the case.
It sounds like you're talking about 1. Opening the Python interpreter directly inside a PS window.I don't actually know how to do this one. I also don't think it's needed because once you're in the Python interpreter, it doesn't matter if your using Windows CMD, PS, Bash, or any other shell environment. Exiting the Python interpreter also closes your shell window. 2. Opening a PS prompt that has all the environment variables set.I was messing with that a while ago, back when I first suggested the feature. I came up with the following.
|
Thanks! It should be enough for me to try connecting the dots:
|
I will add this, a true value-addition for me:
|
Well, my Powershell1 comprehension is far from perfect, so for now:
|
Powershell Noob question: should I duplicate |
merged in beta3 with #339 |
Sorry for the delayed response.
I'm not much of a PS guru either, but my initial thought is no, you don't need to duplicate them.
I agree! Default CMD/PS sizes are far too small... |
sorry to bump an old thread.. especially since this comment is fairly obvious.. but it's probably worth mentioning.. for those of us who
it's super easy to run python, pip, etc from bash..
|
Summary:
Create a shortcut to a PowerShell session with all of the environment variables set already.
Reasoning:
Windows PowerShell is a more powerful, more feature-rich, and more customizable shell than the command prompt, cmd.exe (especially in Windows 10 which added even more goodies).
Implementation Issues:
The only issue I can think of right now is that, by default, Windows restricts powershell scripts from running.
Set-ExecutionPolicy RemoteSigned
orSet-ExecutionPolicy Unrestricted
in powershell before running the script. This, however, requires administrator privileges which (in my opinion) goes against one of the primary benefits of WinPython.powershell -ExecutionPolicy ByPass -File '.\WinPython Command Prompt (PowerShell).ps1'
. But in order to do that you must already have a PS window open. Not a big deal, but it means that it's a 2-step process.The text was updated successfully, but these errors were encountered: