Passwords used in a useful way

Please support our Python advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Jul 2009
Posts: 42
Reputation: Aiban is an unknown quantity at this point 
Solved Threads: 0
Aiban Aiban is offline Offline
Light Poster

Passwords used in a useful way

 
0
  #1
Jul 26th, 2009
Hello.

As a new python student we all tried the password program

Mine looked like this

  1. def Password():
  2. password = ent.get()
  3. if password == '12345':
  4. ent.delete(0,END)
  5. ent.insert(0,'Welcome Back Aiban')
  6. else:
  7. ent.delete(0,END)
  8. ent.insert(0,'Incorrect')

ok ... it does it's job and shows me when i get it right or when i get it wrong.
But how can i turn this into something more useful. In terms of ... well i have a window full of buttons including the password code right at the top.... thing is right now ... you can ignore it .. and move on and click all the other functions of the buttons without even using the password as the password isn't exactly linked to the rest of the program.

Ideally i would love to see the whole interface hidden UNTIL the correct password is typed .. then reveal the rest .... or the password dialogue to appear in a windows on top of the main menu (and the main menu cannot be touched until password is typed) .
Thinking outside the box a bit .... how about a blank canvas that COVERS all the program buttons except password and is removed ONCE the correct password is typed.

Looking for ideas on how to implement, code snippets and if it is time to shutup yeha yeah .. i type alot
--
Ivan Wheelwright
Python 2.6 + tkinter + XP
Student of Japanese
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 1,067
Reputation: jlm699 is a jewel in the rough jlm699 is a jewel in the rough jlm699 is a jewel in the rough jlm699 is a jewel in the rough 
Solved Threads: 268
Sponsor
jlm699's Avatar
jlm699 jlm699 is offline Offline
Knows where his Towel is

Re: Passwords used in a useful way

 
0
  #2
Jul 27th, 2009
If you were using an older version of python and working in the wx GUI toolkit I would suggest using a simple dialog box and giving it the directive ShowModal() , which makes it the only window with focus. No other parent window can be accessed until the dialog box has been taken care of. Then you could simply write in code to close the entire program if the dialog box is "cancelled" or closed.

Unfortunately I'm not that versed in tkinter, so I'm not sure if similar functionality exists or not.
1. Use Code Tags.
2. Homework? Show Effort.
3. Keep discussions on the forum: no PMs
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 42
Reputation: Aiban is an unknown quantity at this point 
Solved Threads: 0
Aiban Aiban is offline Offline
Light Poster

Re: Passwords used in a useful way

 
0
  #3
Jul 28th, 2009
I tried it anyways but it didn't work ... although i also did not get any error ... L( but if anyone knows a tkinter solution, would love to hear, intersly your suggestion is part of another problem i am trying to solve as i type .. how to lock focus on a window so the other windows canot be touched. Finding that solution might help me solve this one as well.
--
Ivan Wheelwright
Python 2.6 + tkinter + XP
Student of Japanese
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 1,067
Reputation: jlm699 is a jewel in the rough jlm699 is a jewel in the rough jlm699 is a jewel in the rough jlm699 is a jewel in the rough 
Solved Threads: 268
Sponsor
jlm699's Avatar
jlm699 jlm699 is offline Offline
Knows where his Towel is

Re: Passwords used in a useful way

 
0
  #4
Jul 28th, 2009
Originally Posted by Aiban View Post
I tried it anyways but it didn't work ... although i also did not get any error ... L( but if anyone knows a tkinter solution, would love to hear, intersly your suggestion is part of another problem i am trying to solve as i type .. how to lock focus on a window so the other windows canot be touched. Finding that solution might help me solve this one as well.
Perhaps then your solution is to switch GUI toolkits!

I've always preferred wx over tk and anxiously await a 3.0 compliant version of wx
1. Use Code Tags.
2. Homework? Show Effort.
3. Keep discussions on the forum: no PMs
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 42
Reputation: Aiban is an unknown quantity at this point 
Solved Threads: 0
Aiban Aiban is offline Offline
Light Poster

Re: Passwords used in a useful way

 
0
  #5
Jul 28th, 2009
Yeah, i know it can be done .. i'm sure ... and it seems like a use a hammer to kill the fly answer since that would mean also downgrading the python version just to use a different toolkit, only to be regraded later when wx works with v3 and then i reupgrade.

Messy hey .... if i'd been doing this a year ago, i would certainly have held off my upgrade, i'll hang around for awhile longer and see if any other solutions come up, i also read a fairly lengthy thing on tkinter and focus of windows but that was from 1999
--
Ivan Wheelwright
Python 2.6 + tkinter + XP
Student of Japanese
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 174
Reputation: snippsat is an unknown quantity at this point 
Solved Threads: 50
snippsat's Avatar
snippsat snippsat is offline Offline
Junior Poster

Re: Passwords used in a useful way

 
0
  #6
Jul 28th, 2009
mean also downgrading the python version just to use a different toolkit, only to be regraded later when wx works with v3 and then i reupgrade.
There is now upp and downgrade in python.
Most off us you 2.x,that dosent mean that we dont test python 3.x out.
Have off course both 2.x and 3.x installed.

There are to much info and 3 part modules one need to only use 3.x
And most books are for 2.x

When learing 2.x you do off couse learn 3.x,they changes arent that big.

You can use 2to3 module for covert code from 2.x to 3.x
That`s work fine,but not needed more for test to see the difference.

One day all will use 3.x,but why hurry?

If one only use 3.x will this not give any advances in the future?
No not at all,because all info about learing this great language is in 2.x
This is info man for sure need.
They changes are way to small to trow that info away.
Last edited by snippsat; Jul 28th, 2009 at 2:06 pm.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Python Forum
Thread Tools Search this Thread



Tag cloud for Python
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC