Search code examples
pythonconsole

Running python code in the old windows console host and not windows 11 terminal


I'm currently learning python and want to manipulate the console (set sizes and stuff), but it's hard to do so in the new windows terminal.

So is there a way to make your python code (likely as exe) run in the old windows console host and not the new windows 11 terminal?

I have tried making a .bat file to run the file, but it still opens in the terminal. I have also tried asking ChatGPT, but it doesn't know what I'm talking about. The python library 'Rich' doesn't work either.


Solution

  • I have concluded that it is not possible to do the following. The application/tool used to execute a file (no matter the filetype) is completely up to the executor. Although, if you want to execute a .exe file on windows using the old windows console host, you can do so by opening the new windows terminal > Settings > Default terminal application, and selecting 'Windows Console Host'. (note: this only works for your PC)

    I hope this can help anyone else wondering whether or not it's possible.