Re: [Tutor] login window using Tk

2011-11-02 Thread Alan Gauld
On 02/11/11 05:05, Chris Hare wrote: def verifyLogin(self): farmid = list.get(ACTIVE) userid = login_userid.get() login_passwd = login_passwd.get() gets called, but I get the error Exception in Tkinter callback farmid =

Re: [Tutor] login window using Tk

2011-11-02 Thread Chris Hare
Just thought I would drop y'all a note and say thank you for your help on this. I have the login code working. I learned a bunch from you guys. Thanks! Chris Hare ch...@labr.net http://www.labr.net On Nov 2, 2011, at 5:02 AM, Alan Gauld wrote: On 02/11/11 05:05, Chris Hare wrote:

Re: [Tutor] login window using Tk

2011-11-02 Thread Steven D'Aprano
On Wed, 2 Nov 2011 11:54:17 am Alan Gauld wrote: On 01/11/11 21:15, Joel Montes de Oca wrote: Question, once the code is compiled to a binary, can someone inject code to cause the hidden window to show, skipping the login altogether? In general you don't compile Python to a binary,

Re: [Tutor] login window using Tk

2011-11-01 Thread Steve Willoughby
On 01-Nov-11 09:47, Chris Hare wrote: Questions: 1. Is this the best way of doing this or is there a better way? 2. How do I exit the main loop when the user has authenticated? Why stop the main loop and restart it? Typically you'd setup the app, and start the main loop running for the

Re: [Tutor] login window using Tk

2011-11-01 Thread Joel M.
I am also intrested in this topic. Chris were you thinking of using the window.hide() method? -Joel M On Nov 1, 2011 1:21 PM, Chris Hare ch...@labr.net wrote: I am working on a python Tk program which involves a login window and I am looking for some advice. Currently the code I have

Re: [Tutor] login window using Tk

2011-11-01 Thread Alan Gauld
On 01/11/11 16:47, Chris Hare wrote: I am working on a python Tk program which involves a login window and I am looking for some advice. Currently the code I have creates a window (Toplevel) where the login controls are and I am running that using a main loop for the window. Don't do this,

Re: [Tutor] login window using Tk

2011-11-01 Thread Alexander Etter
On Nov 1, 2011, at 12:47, Chris Hare ch...@labr.net wrote: I am working on a python Tk program which involves a login window and I am looking for some advice. Currently the code I have creates a window (Toplevel) where the login controls are and I am running that using a main loop for

Re: [Tutor] login window using Tk

2011-11-01 Thread Alan Gauld
On 01/11/11 18:09, Alexander Etter wrote: Hi, hopefully a more experience hacker can provide clarity, but how secure does this login need to be? I dont much about python in DRAM but your login sounds like it could be easily hacked. That depends entirely on how the user is authenticated.

Re: [Tutor] login window using Tk

2011-11-01 Thread Chris Hare
Here is a code snippet I have pulled out of the project. It is as bare bones as I can make it to get the point across. the problems I am having: 1. I would really like the window to be centered in the user's screen, but setting the geometry doesn't place it there. (that isn't included here)

Re: [Tutor] login window using Tk

2011-11-01 Thread Chris Hare
Okay - that makes sense. The login window uses the show=* for the password field and is authenticated against a database where the passwords are encrypted. I have this working in a text only environment, just struggling to get it right for the GUI Thanks Chris Hare ch...@labr.net

Re: [Tutor] login window using Tk

2011-11-01 Thread Wayne Werner
On Tue, Nov 1, 2011 at 1:57 PM, Chris Hare ch...@labr.net wrote: Here is a code snippet I have pulled out of the project. It is as bare bones as I can make it to get the point across. the problems I am having: 1. I would really like the window to be centered in the user's screen, but

Re: [Tutor] login window using Tk

2011-11-01 Thread Alan Gauld
On 01/11/11 18:57, Chris Hare wrote: Here is a code snippet I have pulled out of the project. It is as bare bones as I can make it to get the point across. I think you could have dropped a lot more to be honst - like all the menu code for a start... 1. I would really like the window to be

Re: [Tutor] login window using Tk

2011-11-01 Thread Joel Montes de Oca
On 11/01/2011 02:18 PM, Alan Gauld wrote: On 01/11/11 18:09, Alexander Etter wrote: Hi, hopefully a more experience hacker can provide clarity, but how secure does this login need to be? I dont much about python in DRAM but your login sounds like it could be easily hacked. That depends

Re: [Tutor] login window using Tk

2011-11-01 Thread Chris Hare
Good feedback Alan, thanks. I wasn't using the root window to hold the login form, although I suppose I could. I guess where I am stuck is the login to control displaying the login window, and hiding it to display the actual application window once the user has authenticated. Chris Hare

Re: [Tutor] login window using Tk

2011-11-01 Thread Wayne Werner
On Nov 1, 2011 4:17 PM, Joel Montes de Oca joelmonte...@gmail.com wrote: On 11/01/2011 02:18 PM, Alan Gauld wrote: On 01/11/11 18:09, Alexander Etter wrote: Hi, hopefully a more experience hacker can provide clarity, but how secure does this login need to be? I dont much about python in

Re: [Tutor] login window using Tk

2011-11-01 Thread Justin Straube
On 11/1/2011 3:28 PM, Chris Hare wrote: Good feedback Alan, thanks. I wasn't using the root window to hold the login form, although I suppose I could. I guess where I am stuck is the login to control displaying the login window, and hiding it to display the actual application window once the

Re: [Tutor] login window using Tk

2011-11-01 Thread Alan Gauld
On 01/11/11 21:28, Chris Hare wrote: Good feedback Alan, thanks. I wasn't using the root window to hold the login form, although I suppose I could. I guess where I am stuck is the login to control displaying the login window, and hiding it to display the actual application window once the user

Re: [Tutor] login window using Tk

2011-11-01 Thread Alan Gauld
On 01/11/11 21:15, Joel Montes de Oca wrote: Question, once the code is compiled to a binary, can someone inject code to cause the hidden window to show, skipping the login altogether? In general you don't compile Python to a binary, although tools exist that give a good approximation to

Re: [Tutor] login window using Tk

2011-11-01 Thread Alan Gauld
On 02/11/11 00:16, Justin Straube wrote: Have you looked into using a Frame to hold you input fields, and then using .destroy() to remove it upon successful login? This is a valid approach for some scenarios but its not the norm for login dialogs. They usually popup as fairly small

Re: [Tutor] login window using Tk

2011-11-01 Thread Chris Hare
Thanks everyone for all of the help. I almost have this working. Everything is written in a class. I think I have that right, but that remains to be seen. :-) I can create the login window and get all of the controls on it. My function gets called to validate the information in the fields