On Thu, May 8, 2008 at 11:15 AM, Gurpreet Sachdeva
<[EMAIL PROTECTED]> wrote:
> Yeah thats what I found. Any idea what settings need to be done in the
> webserver (Apache) to report content-length header? Or any other
> alternative?
>
> Thanks for your help,
> Gurpreet
>
AFAIK, Apache 2 reports Con
--- On Thu, 5/8/08, Kushal Das <[EMAIL PROTECTED]> wrote:
> From: Kushal Das <[EMAIL PROTECTED]>
> Subject: [BangPypers] How to sort the IP(s)
> To: bangpypers@python.org
> Date: Thursday, May 8, 2008, 11:53 PM
> Hi,
> What is the best way to sort IP numbers
> numbers like
> 192.168.20.1
> 192.16
Hi,
Adventures with Neko
(http://gnuvision.com/books/pybook/) is an
introductory book on Python programming for school
children by Mr. Pramode CE.
It is fun for children (when I tried it, me too liked
it) to do programming with Neko, the cat. It is using
the Tkinter module for graphics and it wo
On 5/8/08, Samit Jain <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> can you please tell me any training institute for python language in delhi
>
> --
> Regards,
> Samit Jain
> Intellisoft Services
> [EMAIL PROTECTED]
> +91-9899765287
> ___
> BangPypers maili
On Thu, May 8, 2008 at 3:23 PM, Anand Chitipothu <[EMAIL PROTECTED]> wrote:
> > I have downloaded
> > this picture and in my system, when I checked it, it's
> > size is 132k
> > ie
> > du --si la-brea-tar-pits-address.jpg
> > 132kla-brea-tar-pits-address.jpg
> >
> > It seems to me
On Thu, May 8, 2008 at 3:11 PM, Anand Chitipothu <[EMAIL PROTECTED]> wrote:
> On Thu, May 8, 2008 at 2:47 PM, Anand Balachandran Pillai
> <[EMAIL PROTECTED]> wrote:
>
> > Do you really need any kind of additional processing ?
> >
> > The basic sort algorithm is smart enough to do this by itself
> I have downloaded
> this picture and in my system, when I checked it, it's
> size is 132k
> ie
> du --si la-brea-tar-pits-address.jpg
> 132kla-brea-tar-pits-address.jpg
>
> It seems to me like a mismatch between the actual size
> and the value obtained from the Content-Length. But
>
On Thu, May 8, 2008 at 2:47 PM, Anand Balachandran Pillai
<[EMAIL PROTECTED]> wrote:
> Do you really need any kind of additional processing ?
>
> The basic sort algorithm is smart enough to do this by itself,
> >>> l=['192.168.1.1','172.18.13.2','192.168.3.2','172.19.2.1']
> >>>l.sort()
> >>>l
Hi,
Just a patch for Anand's solution using httplib :)
import httplib
conn = httplib.HTTPConnection(host)
conn.request('HEAD', path)
print conn.getresponse().getheader('Content-Length')
5c5
< print conn.getresponse().getheader('Content-Type')
---
> print conn.getresponse().getheader('Conten
Anand Balachandran Pillai wrote:
Do you really need any kind of additional processing ?
But, string sorting might not produce proper sorting right?
>>> l=['192.168.11.1','172.18.13.2','192.168.2.2','172.19.2.1']
>>> l.sort()
>>> l
['172.18.13.2', '172.19.2.1', '192.168.11.1', '192.168.2.2']
Ok, this approach does not work well always...
>>> l=['192.168.10.10','192.168.10.8','192.168.10.1','192.168.12.1']
>>> sorted(l)
['192.168.10.1', '192.168.10.10', '192.168.10.8', '192.168.12.1']
So something like Anand C's solution is required.
--Anand
On Thu, May 8, 2008 at 2:47 PM, Anand Bal
Do you really need any kind of additional processing ?
The basic sort algorithm is smart enough to do this by itself,
>>> l=['192.168.1.1','172.18.13.2','192.168.3.2','172.19.2.1']
>>>l.sort()
>>>l
['172.18.13.2', '172.19.2.1', '192.168.1.1', '192.168.3.2']
or use sorted(...) if you don't want to
On Thu, May 8, 2008 at 11:53 PM, Kushal Das <[EMAIL PROTECTED]> wrote:
> Hi,
> What is the best way to sort IP numbers
> numbers like
> 192.168.20.1
> 192.168.1.1
> 172.18.13.2
ips = ['192.168.20.1', '192.168.1.1', '172.18.13.2']
sorted(ips, key=lambda ip: [int(x) for x in ip.split('.')])
#
This is one way.
make_num = lambda ip: [int(p) for p in ip.split('.')]
ips = ['192.168.1.1','172.18.13.2', '192.168.20.1']
ips = [(make_num(ip), ip) for ip in ips]
ips.sort()
ips.reverse()
ips = [ip[1] for ip in ips]
On Thu, May 8, 2008 at 11:53 PM, Kushal Das <[EMAIL PROTECTED]> wrote:
> Hi,
>
Hi,
What is the best way to sort IP numbers
numbers like
192.168.20.1
192.168.1.1
172.18.13.2
Kushal
--
Fedora Ambassador, India
http://kushaldas.in
http://dgplug.org (Linux User Group of Durgapur)
___
BangPypers mailing list
BangPypers@python.org
htt
15 matches
Mail list logo