Re: error importing smtplib

2012-11-17 Thread Dieter Maurer
Eric Frederich writes: > ... > So I'm guessing the problem is that after I log in, the process has a > conflicting libssl.so file loaded. > Then when I try to import smtplib it tries getting things from there and > that is where the errors are coming from. > > The question now is how do I fix

[OFF] Convert GMap Encoded Polyline string to a set of coordinates

2012-11-17 Thread leonardo
Hi, How to convert GMap Encoded Polyline string to a set of coordinates ? I need it to calculate the distance between a coordinate and a line in a Django app. Thanks, -- http://mail.python.org/mailman/listinfo/python-list

Re: module trace and counts

2012-11-17 Thread Dave Angel
On 11/17/2012 08:30 PM, Steven D'Aprano wrote: > On Sat, 17 Nov 2012 13:37:23 -0500, Dave Angel wrote: > >> On 11/17/2012 12:25 PM, rh wrote: >>> Is it for or range that is executed 8000 times when I for i in >>> range(3,8000,2): >> Nothing is executed 8000 times. I figure it at 3998 times. > Off

Re: module trace and counts

2012-11-17 Thread Steven D'Aprano
On Sat, 17 Nov 2012 13:37:23 -0500, Dave Angel wrote: > On 11/17/2012 12:25 PM, rh wrote: >> Is it for or range that is executed 8000 times when I for i in >> range(3,8000,2): > Nothing is executed 8000 times. I figure it at 3998 times. Off by one. py> len(range(3, 8000, 2)) 3999 -- Steven -

Re: Python Script for Colorizing Traceroute Output (apologies for top-post)

2012-11-17 Thread Chris Angelico
On Sun, Nov 18, 2012 at 12:18 PM, Steven D'Aprano wrote: > On Sun, 18 Nov 2012 09:00:10 +1100, Chris Angelico wrote: > > [...] >> I've never used the program, though, so I have no idea how good it is. >> All I've done is download the tar.gz and glance over a few bits (the >> licence, mainly - whic

Re: Python Script for Colorizing Traceroute Output (apologies for top-post)

2012-11-17 Thread Steven D'Aprano
On Sun, 18 Nov 2012 09:00:10 +1100, Chris Angelico wrote: [...] > I've never used the program, though, so I have no idea how good it is. > All I've done is download the tar.gz and glance over a few bits (the > licence, mainly - which is mostly-GPL). "Mostly" GPL? You mean "not GPL". I really wis

Re: Python Script for Colorizing Traceroute Output (apologies for top-post)

2012-11-17 Thread Chris Angelico
On Sun, Nov 18, 2012 at 6:59 AM, Jordan Bylsma wrote: > For this case the firewalls DO respond to TTL(in most cases) and will show in > a traceroute. The objective here is to colorize particular devices to easily > see what type of devices traffic would traverse across the network. I would > be

Re: Python Script for Colorizing Traceroute Output (apologies for top-post)

2012-11-17 Thread Jordan Bylsma
For this case the firewalls DO respond to TTL(in most cases) and will show in a traceroute. The objective here is to colorize particular devices to easily see what type of devices traffic would traverse across the network. I would be using a database of device hostnames that when they match in t

Re: latin1 and cp1252 inconsistent?

2012-11-17 Thread Nobody
On Sat, 17 Nov 2012 08:56:46 -0800, buck wrote: >> Given that the only differences between the two are for code points >> which are in the C1 range (0x80-0x9F), which should never occur in HTML, >> parsing ISO-8859-1 as Windows-1252 should be harmless. > > "should" is a wish. The reality is that

Re: Python Script for Colorizing Traceroute Output (apologies for top-post)

2012-11-17 Thread Chris Angelico
On Sun, Nov 18, 2012 at 5:38 AM, Roy Smith wrote: > In article , > w...@mac.com wrote: >> Don't forget that most firewalls don't decrement) the time-to-live number, >> and unless you REALLY know what to look for, are invisible. > > Interesting. If the firewall doesn't decrement TTL (a particular

Re: Python Script for Colorizing Traceroute Output (apologies for top-post)

2012-11-17 Thread Roy Smith
In article , w...@mac.com wrote: > On Nov 17, 2012, at 10:04 AM, Jordan Bylsma wrote: > > > I'm looking into writing a python script that colorizes particular hops > > when using traceroute. Anyone run across something like this? I don't think > > it would be extremely difficult to write but

Re: module trace and counts

2012-11-17 Thread Dave Angel
On 11/17/2012 12:25 PM, rh wrote: > Is it for or range that is executed 8000 times when I > for i in range(3,8000,2): Nothing is executed 8000 times. I figure it at 3998 times. Anyway, neither the for nor the range is executed multiple times. Deciphering this depends on whether this is Python 2.

Re: latin1 and cp1252 inconsistent?

2012-11-17 Thread Ian Kelly
On Sat, Nov 17, 2012 at 9:56 AM, wrote: > "should" is a wish. The reality is that documents (and especially URLs) exist > that can be decoded with latin1, but will backtrace with cp1252. I see this > as a sign that a small refactorization of cp1252 is in order. The proposal is > to change thos

Re: latin1 and cp1252 inconsistent?

2012-11-17 Thread Ian Kelly
On Sat, Nov 17, 2012 at 11:08 AM, Ian Kelly wrote: > On Sat, Nov 17, 2012 at 9:56 AM, wrote: >> "should" is a wish. The reality is that documents (and especially URLs) >> exist that can be decoded with latin1, but will backtrace with cp1252. I see >> this as a sign that a small refactorization

Re: Python Script for Colorizing Traceroute Output (apologies for top-post)

2012-11-17 Thread wrw
On Nov 17, 2012, at 10:04 AM, Jordan Bylsma wrote: > I'm looking into writing a python script that colorizes particular hops when > using traceroute. Anyone run across something like this? I don't think it > would be extremely difficult to write but some example code would help. > > Basically

Re: Python Script for Colorizing Traceroute Output

2012-11-17 Thread wrw
Don't forget that most firewalls don't decrement) the time-to-live number, and unless you REALLY know what to look for, are invisible. -Bill On Nov 17, 2012, at 10:04 AM, Jordan Bylsma wrote: > I'm looking into writing a python script that colorizes particular hops when > using traceroute. An

Re: Python Interview Questions

2012-11-17 Thread chinjannisha
Hi I had one doubt.. I know very little bit of python .I wanted to know when to use list,tuple,dictionary and set? Please reply me asap thanks -- http://mail.python.org/mailman/listinfo/python-list

Re: module trace and counts

2012-11-17 Thread Steven D'Aprano
On Sat, 17 Nov 2012 09:25:02 -0800, rh wrote: > Is it for or range that is executed 8000 times when I for i in > range(3,8000,2): I'm sorry, I don't understand that question. Is it for what? What "it" are you talking about? If you run the code: for i in range(3, 8000, 2): pass the `for` s

Re: latin1 and cp1252 inconsistent?

2012-11-17 Thread buck
On Friday, November 16, 2012 4:33:14 PM UTC-8, Nobody wrote: > On Fri, 16 Nov 2012 13:44:03 -0800, buck wrote: > IOW: Microsoft's "embrace, extend, extinguish" strategy has been too > successful and now we have to deal with it. If HTML content is tagged as > using ISO-8859-1, it's more likely that

Re: Catching exceptions from Python 2.4 to 3.x

2012-11-17 Thread Steven D'Aprano
On Sat, 17 Nov 2012 14:26:43 +1100, Cameron Simpson wrote: > On 17Nov2012 03:12, Steven D'Aprano > wrote: > | Is there some other trick to grab the current exception from inside an > | except block? > > sys.exc_info ? Thanks, that is just what I was looking for. -- Steven -- http://mail.

Re: Python Script for Colorizing Traceroute Output

2012-11-17 Thread garabik-news-2005-05
Jordan Bylsma wrote: > I'm looking into writing a python script that colorizes particular > hops when using traceroute. Anyone run across something like this? I > don't think it would be extremely difficult to write but some example > code would help. > Generic Colouriser http://kassiopeia.juls

Python Script for Colorizing Traceroute Output

2012-11-17 Thread Jordan Bylsma
I'm looking into writing a python script that colorizes particular hops when using traceroute. Anyone run across something like this? I don't think it would be extremely difficult to write but some example code would help. Basically particular hops in traceroute output would match a table as eit