[Tutor] Help with basic user-data file

Asrarahmed Kadri ajkadri at googlemail.com
Thu Oct 12 15:41:39 CEST 2006


It means there is no need of entering the data in the dictionary,??

How will I then implement the uniqueness of loginnames???

Thanks for the support.
regards,
Asrar


On 10/12/06, Rob Andrews <rob.andrews at gmail.com> wrote:
>
> To keep the information, the simplest solution is simply to save it in
> a text file that the program can load into memory when it starts up
> again. For sensitive information like passwords, a little extra fuss
> is generally merited.
>
> When someone logs in, you can save a value like
> time.strftime(time.ctime()) for a nice, human-readable time stamp.
> Don't forget to "import time" first.
>
> -Rob A.
>
> On 10/12/06, Asrarahmed Kadri <ajkadri at googlemail.com> wrote:
> > Folks,
> >
> > I am trying to modify the userManagement program given in Core Python
> > Programming. It uses a dictionary to store user-password information.
> The
> > usernames are the keys and the passwords are the values.
> > Now I want is to add a third element; last login time.
> > I want to store this information in a file so that the data is not lost
> once
> > the program stops execution.
> >
> > I am not sure of using time function in python..
> > Can anyone help with this issue??
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>



-- 
To HIM you shall return.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20061012/7605682f/attachment.htm 


More information about the Tutor mailing list