2

Hello to the Stack Overflow Community! I am an amateur coder & student and am developing a UI for my superiors at my 'school.' I have been bothered by the Python Shell window opening as well and was wondering if there was a way to remove that window without having my Tkinter program shut down.

Thanks!

7
  • 1
    Windows or Mac? Commented Jan 22, 2017 at 19:18
  • DYZ: Mac OSX Sierra Commented Jan 22, 2017 at 19:20
  • you mean "command line" like "cmd.exe/terminal/console", not "Python Shell" ? BTW: why do you set tag python-idle ? Commented Jan 22, 2017 at 19:20
  • 1
    When your script is run in "production" it won't be from IDLE's shell. Trying running it the way if will be. Commented Jan 22, 2017 at 19:49
  • 1
    has IDLE something to do with your problem ? If not then it doesn't matter that you use IDLE to code. How do you run this script ? Do you click on script, run in console python script (as most of people) or in IDLE ? If you run in IDLE then don't bother Python Shell - IDLE is used only to develop code. Later you don't need IDLE to run it and you will no see Python Shell. Commented Jan 22, 2017 at 19:51

2 Answers 2

1

Rename you main script to have the extension .pyw. This file type, when executed, is by default run by pythonw.exe instead of python.exe, and it doesn't show the console.

You will need some means to report debug errors, though. Just an advice.

Sign up to request clarification or add additional context in comments.

3 Comments

it would work on Windows, but not on Mac/Linux - OP use Mac OSX Sierra
The OP is on Mac. There is no .pyw on Mac.
How do we remove the console when we deployed our app using "pyintstaller"?
0

If you run in IDLE then don't bother Python Shell - IDLE is used only to develop code.

Later you don't need IDLE to run it and you will no see Python Shell.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.