Re: HTTP getreply() never returns

2007-04-20 Thread Marko . Cain . 23
On Apr 20, 12:06 am, Steve Holden [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: On Apr 19, 2:39 pm, Steve Holden [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: Hi, I have the following code which send/receive HTTP request/response: # where sampleUrl is '127.0.0.1' and #

HTTP getreply() never returns

2007-04-19 Thread Marko . Cain . 23
Hi, I have the following code which send/receive HTTP request/response: # where sampleUrl is '127.0.0.1' and # url is 'www.cnn.com' h = httplib.HTTP(self.sampleUrl, 8080) h.putrequest('GET', '/sample?url=' + self.url) h.endheaders() errcode, errmsg, headers =

Re: HTTP getreply() never returns

2007-04-19 Thread Marko . Cain . 23
On Apr 19, 2:39 pm, Steve Holden [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: Hi, I have the following code which send/receive HTTP request/response: # where sampleUrl is '127.0.0.1' and # url is 'www.cnn.com' h = httplib.HTTP(self.sampleUrl, 8080)

Re: how to strip the domain name in python?

2007-04-15 Thread Marko . Cain . 23
On Apr 14, 10:36 am, [EMAIL PROTECTED] wrote: On Apr 14, 12:02 am, Michael Bentley [EMAIL PROTECTED] wrote: On Apr 13, 2007, at 11:49 PM, [EMAIL PROTECTED] wrote: Hi, I have a list of url names like this, and I am trying to strip out the domain name using the following code:

Re: how to strip the domain name in python?

2007-04-15 Thread Marko . Cain . 23
On Apr 15, 11:57 am, Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote: In [EMAIL PROTECTED], Marko.Cain.23 wrote: On Apr 14, 10:36 am, [EMAIL PROTECTED] wrote: On Apr 14, 12:02 am, Michael Bentley [EMAIL PROTECTED] wrote: On Apr 13, 2007, at 11:49 PM, [EMAIL PROTECTED] wrote:

Re: how to strip the domain name in python?

2007-04-14 Thread Marko . Cain . 23
On Apr 14, 12:02 am, Michael Bentley [EMAIL PROTECTED] wrote: On Apr 13, 2007, at 11:49 PM, [EMAIL PROTECTED] wrote: Hi, I have a list of url names like this, and I am trying to strip out the domain name using the following code: http://www.cnn.com www.yahoo.com

how to strip the domain name in python?

2007-04-13 Thread Marko . Cain . 23
Hi, I have a list of url names like this, and I am trying to strip out the domain name using the following code: http://www.cnn.com www.yahoo.com http://www.ebay.co.uk pattern = re.compile(http:(.*)\.(.*), re.S) match = re.findall(pattern, line) if (match): s1, s2 = match[0]

Question about using cookielib in python 2.4

2007-03-29 Thread Marko . Cain . 23
Hi, I am following the example of Python cookbook (14.7) about using cookielib in python2.4 cj = cookielib.LWPCookieJar() // code to send out the request print Coookie- if cj is not None: for index, cookie in enumerate(cj):

How can I find out the size of a file

2007-03-28 Thread Marko . Cain . 23
Hi, How can I find out the size of a file in a disk in python? i try this, but it does not work: size = open(inputFileNameDir + / + file, 'r').size() Thank for any help. -- http://mail.python.org/mailman/listinfo/python-list

how can I clear a dictionary in python

2007-03-28 Thread Marko . Cain . 23
Hi, I create a dictionary like this myDict = {} and I add entry like this: myDict['a'] = 1 but how can I empty the whole dictionary? Thank you. -- http://mail.python.org/mailman/listinfo/python-list