[Tutor] Re: How to save user data?

Andrei project5 at redrival.net
Fri May 28 02:36:15 EDT 2004


acidblue <acidrex <at> earthlink.net> writes:

> I have a textctrl box for usr input, do I use raw_input and assign a
> variable in order to save the information?
> Using wxPython2.4

You don't use raw_input if you use wxPython. raw_input is for command line
(console) applications, while the whole point of wxPython is *not* to have a
console application :). You should use some kind of wxTextCtrl and use its
GetValue method to get the user's input in that text control. E.g.:

  username = MyTextCtrl.GetValue()

You can then do with that input whatever you like, including saving it.

Yours,

Andrei





More information about the Tutor mailing list