why is the python GUI interface fleeting
Question: 
    #coding=utf-8
    import wx 
    class App(wx.App):
        def OnInit(self):
            frame=wx.Frame(parent=None,title='Bare')
            frame.Show()
            return Ture
    app=App()
    app.MainLoop()
    

runs OK! but the GUI interface is fleeting, just leaving the CMD console in
the screen. a newer for python ,why the outcome of the GUI interface fleeting?
environment:Gvim+WIN7+PYTHON2.7


Answer: First, according to `help :!` command of `vim`:

> `:!{cmd}` Execute {cmd} with **the shell**.

`vim` cause the cmd shell to be executed.

Second, according to [Using Python on Windows - Executing
scripts](http://docs.python.org/2/using/windows.html#executing-scripts):

> Python scripts (files with the extension .py) will be executed by
> `python.exe by` default. **This executable opens a terminal, which stays
> open even if the program uses a GUI.** If you do not want this to happen,
> use the extension `.pyw` which will cause the script to be executed by
> `pythonw.exe` by default (both executables are located in the top-level of
> your Python installation directory). This suppresses the terminal window on
> startup.

So, if you want run the GUI program without cmd console, run the program
outside the vim using `pythonw.exe`. For instance, save the file with `.pyw`
extension, and double click the file.

