
How to do it...
We can create a simple message box, as follows:

This will result in the following two windows:

This does not look like what we had in mind. Now, we have two windows, one undesired and the second with its text displayed as its title.
Oops!
Let's solve this now. We can change the Python code by adding a single or double quote, followed by a comma:

Now, we do not have a title but our text ended up inside the popup, as we had intended:
GUI_independent_msg_info.py

The first parameter is the title and the second is the text displayed in the pop-up message box. By adding an empty pair of single or double quotes, followed by a comma, we can move our text from the title into the pop-up message box.
We still need a title and we definitely want to get rid of this unnecessary second window. The second window is caused by a Windows event loop. We can get rid of it by suppressing it.
Add the following code:

Now, we have only one window. The withdraw() function removes the debug window that we are not interested in having floating around:

In order to add a title, all we have to do is place some string into our empty first argument.
For example, consider the following code snippet:

Now our dialog has a title, as shown in the following screenshot:
