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
Hide Command prompt on Windows #65
Comments
Bump! |
up |
How would that fix work if someone doesn't have powershell installed and they are launching |
What versions of Windows are you running? I would just want to make sure this change doesn't break on different versions of Windows. |
It has been 1 month since we replied on this issue but with no updates from the commenters. Closing this issue for now. |
Alright, reopening issue |
@shivapoudel Can you also provide the version of Sublime Text you are using so we can reproduce more easily? |
I have successfully reproduced on an ievm for Windows 7 and Sublime Text 3. However, I am not too sure of the best approach. The one mentioned earlier seems like it will be problematic for non-bat invocations (e.g. @shivapoudel Do you have any solutions and would you be interested in opening a PR? |
@twolfson Using Sublime Text 3 build 3083. Found temporary solution but not sure this will help all =/
|
Interesting. @wbond Can you provide insight into why we have a |
Well, the subprocess package in Python uses cmd.exe to start the subprocess. If you launch powershell.exe through the subprocess package, powershell inherits the window dimensions of cmd.exe and the color scheme also. The batch script launches powershell with a ps1 script to reset the dimensions to something reasonable and the default color scheme. In order to fix this issue "properly," and get rid of the batch script, I believe the solution would be to use the Win32 API to launch the powershell process. I have never done such a thing before, but it would need to be done through ctypes. My guess is a call to something like https://msdn.microsoft.com/en-us/library/windows/desktop/ms682425(v=vs.85).aspx. |
@twolfson If you can then please help this bug fix ASAP. Sorry my bad luck but I haven't written python code till the date so I am unable to submit the PR. |
I don't think this is a critical bug; it doesn't break anyone's UI. It causes a minor inconvenience which resolves itself. I am inexperienced with Windows programming as well. I am going to leave this PR as "enhancement"/"help wanted" for anyone who wants to repair this and has knowledge of Windows (or has the time to learn). |
@taragurung Do you have any solutions and would you be interested in opening a PR? |
let me check On Fri, Jul 17, 2015 at 2:52 PM, Shiva Poudel notifications@github.com
|
Open Terminal Here briefly shows a
cmd.exe
window before launchingpowershell.exe
This can be easily hidden by passing a
startupinfo
argument tosubprocess.Popen()
Would like me to submit a pull request?
The text was updated successfully, but these errors were encountered: