Python Forum
Trying to disable console window in Visual Studio - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: GUI (https://python-forum.io/forum-10.html)
+--- Thread: Trying to disable console window in Visual Studio (/thread-26245.html)



Trying to disable console window in Visual Studio - 357mag - Apr-25-2020

I'm experimenting with Python and Visual Studio. One thing that bugs me is that even when I make a GUI program and then I run it Visual Studio still puts up that black console window in addition to my GUI window.

Seems to me there should be a setting that would allow users to disable the console window, but I have not met with any luck.

If anyone knows anything about this please post.


RE: Trying to disable console window in Visual Studio - deanhystad - Apr-25-2020

Visual Studio or Visual Studio Code? Python in Visual Studio is horrible. Visual Studio Code is a much better experience.


RE: Trying to disable console window in Visual Studio - 357mag - Apr-25-2020

(Apr-25-2020, 04:05 AM)deanhystad Wrote: Visual Studio or Visual Studio Code? Python in Visual Studio is horrible. Visual Studio Code is a much better experience.

I don't see why that would be true. Visual Studio is a world class IDE. Can you shut off the console window in Visual Studio Code?


RE: Trying to disable console window in Visual Studio - deanhystad - Apr-25-2020

Visual Studio may be great for C# or C++ (I use it for both), but I forced myself to use it for python for a couple of months and did not like it at all. Nor have I ever seen it even mentioned in any Top X IDE's for Python articles.

In visual studio code the terminal is in the IDE, if I want. As many terminals as I want. Whatever type of terminal I like to use. When I run a program no windows pop up unless my program makes windows. If there is something you don't like about Code, somebody probably made an extension to fix it. I can pick my linting tool, my unit test tool, my keyboard mapping. Using kite I get autocomplete and code snippets and access to documentation that I think is slightly better than Visual Studio.

And the best thing about Code is if I don't want to be distracted by all that stuff I can enter Zen mode with the click of a button and all I have is an editor and a run button, or maybe two editors, or more.


RE: Trying to disable console window in Visual Studio - buran - Apr-25-2020

is it really Visual Studio, or just cmd window?
what is your file extension? try with .pyw


RE: Trying to disable console window in Visual Studio - 357mag - Apr-25-2020

I just created a new project and chose Empty Module with the .pyw extension. I got "startup file not specified" error. So I right-clicked on the source code and hit Start without debugging and also tried Start with debugging and the black console window still shows.