I have the following code for controlling access:
--
#check login credentials...
def cklogin(ipaddy, user, authcoded):
try:
print "Opening file:", user
f = file(user,'r+') #load in the user from the file
cusr = pickle.load(f)
print "User Authc
In <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] wrote:
> it reads a file saved this way:
> --
> import pickle
>
> class chatuser: #container for storing user information...
> login = ""
> authcode = ""
> cookie = ""
> ip = ""
> loggedin = 0
> invalid_logins =
oh, well how do I make "derek" be an instance of 'chatuser' ?
--
http://mail.python.org/mailman/listinfo/python-list
In <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] wrote:
> oh, well how do I make "derek" be an instance of 'chatuser' ?
Spot the difference::
In [228]: class A: pass
.228.:
In [229]: a = A
In [230]: repr(a)
Out[230]: ''
In [231]: b = A()
In [232]: repr(b)
Out[232]: '<__main__.A instance
I get it, I missed the little parintheses or however you spell it. () .
--
http://mail.python.org/mailman/listinfo/python-list