Ok so i am using wxPython and I am running Python 2.7 to create a youtube tools type program for my youtube channel, and I am having issues designing a part of it:
Code:
 
class MyFrame(wx.Frame):
    #__init__ Means start with Startup of Program
    def __init__(self, parent, title):
        wx.Frame.__init__(self, parent, title=title, size=(700,500))
        panel=wx.Panel(self)
        txt=wx.TextCtrl(panel, style=wx.TE_PROCESS_ENTER,pos=(25,350), size=(325, 20))
Thats the first few lines and my issue is with the last line in that little part, the "txt=wx.TextCtrl..." part, because I have it set for a variable, txt, and I wanna take that input and put it into this line:
webpage = urlopen(txt).read

But in the end I keep getting an error that is not relevant to this line of code, anyone know why I would get an error? (And yes when I take out this line the code runs fine) Also this is under a different "def", maybe this has something to do with it?

Thanks for Your Help!