开发者

Strange behavior of wxPython control in Pycharm IDE

I'm learning wxPython 2.8 and Pycharm 1.2.1. (Python version - 2.6.6, Windows XP). My first program (from http://wiki.wxpython.org/Getting%20Started#A_First_Application:_.22Hello.2C_World.22):

# hi.py
import wx
class MyFrame(wx.Frame):
    """ We simply derive a new class of Frame. """
    def __init__(self, parent, title):
        wx.Frame.__init__(self, parent, title=title, size开发者_高级运维=(200,100))
        self.control = wx.TextCtrl(self, style=wx.TE_MULTILINE)
        self.Show(True)
app = wx.App(False)
frame = MyFrame(None, 'Small editor')
app.MainLoop()

It runs OK when starting like: python hi.py . But when it starting from PyCharm there is no control TextCtrl on the Frame. Why so?


A lot of IDEs have problems running GUI applications from within. I recall similar issues in PyScripter and not really sure, Wing IDE? The only IDE which seems not to have any issues like this is Eclipse + PyDev, as far as I know.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜