Test tool for python code.

2006-06-07 Thread jnair
Is there any tool available that will tell me what are the different test paths for any python code? thnaks regards Jitu -- http://mail.python.org/mailman/listinfo/python-list

Multiple inheritance : waht does this error mean ?

2006-05-15 Thread jnair
I am using Python 2.4.3 >>>class K(object,list): ...: pass ...: Traceback (most recent call last): File "", line 1, in ? TypeError: Error when calling the metaclass bases Cannot create a consistent method resolution order

Re: how to browse using urllib2 and cookeilib the correct way

2006-04-25 Thread jnair
ok , got it . Thanks -- http://mail.python.org/mailman/listinfo/python-list

how to browse using urllib2 and cookeilib the correct way

2006-04-25 Thread jnair
Hi , I am using python2.4 "urllib2" and "cookelib". In line "5" below i provide my credentials to login into a web site.During the first attempt i "fail", judging from the output of line "6". I try again and the second time i succeed,judging from the output of line "8". Now using the "twill" modu

how to browse using urllib2 and cookeilib the correct way

2006-04-25 Thread jnair
Hi , I am using python2.4 "urllib2" and "cookelib". In line "5" below i provide my credentials to login into a web site.During the first attempt i "fail", judging from the output of line "6". I try again and the second time i succeed,judging from the output of line "8". Now using the "twill" modu

something similar to LWP::Simple mirror function

2006-04-17 Thread jnair
from the perl man pages of LWP::Simple mirror($url, $file) Get and store a document identified by a URL, using If-modified- since, and checking the Content-Length. Returns the HTTP response code. is there something similar in python regards jitya -- http://ma

Re: Is this object counter code pythonic

2006-04-10 Thread jnair
Fredrik is then this a valid "property" use case and pythonic to get/set a common varibale across objects class E(object): _i = 0 def geti(self) : return E._i def seti(self,val) : E._i = val i = property(geti,seti) if __name__ == "__main__": e1 = E() e1.i = 100

Re: Is this object counter code pythonic

2006-04-10 Thread jnair
Ok got it . Thanks a Lot -- http://mail.python.org/mailman/listinfo/python-list

Is this object counter code pythonic

2006-04-10 Thread jnair
My Team Lead says my object counter code seen below is not pythonic class E(object): _count = 0 def __init__(self): E._count += 1 count = property(lambda self: E._count ) def test(): if __name__ == "__main__": e1 = E() print e1.count e2 = E()

Is this code snippet pythonic

2006-04-10 Thread jnair
My Tead Lead my object counter code seen below is not pythonic class E(object): _count = 0 def __init__(self): E._count += 1 count = property(lambda self: E._count ) def test(): if __name__ == "__main__": e1 = E() print e1.count e2 = E()

socket.socket.settimeout implementation

2006-04-05 Thread jnair
When using socket.socket.settimeout we normally only guard against "socket.timeout" exception.Now the implementation of "settimeout" in "Python-2.4.3/Modules/socketmodule.c" sets the socket fd to nonblocking and uses "select()" to timeout as seen below in line 1487 and 1386 : static PyObject * 1