when I try to use the value I get it gets an empty string
dlg = wx.TextEntryDialog(None, 'Enter User Name:', 'Log in')
if dlg.ShowModal() == wx.OK:
self.user=dlg.GetValue()
See wxPython doc. You are mixing up return IDs with wx.MessageBox
.