Re: Decimal ROUND_HALF_EVEN Default

2006-01-16 Thread LordLaraby
If 'bankers rounding' is HALF_ROUND_EVEN, what is HALF_ROUND_UP? I confess to never having heard the terms. I usually do: Y = int(X + 0.5) scaled to proper # of decimal places. Which type of rounding is this? If either. -- http://mail.python.org/mailman/listinfo/python-list

Re: Shrinky-dink Python (also, non-Unicode Python build is broken)

2006-01-16 Thread LordLaraby
I myself wonder why python.dll can't just load a companion i18n.dll when and if it's called for in the script. Such as by having week references to those functions and loading the dll as needed.And probably throwing an exception if it can't be loaded. Most of the CJK stuff could then be carried in

Re: What's wrong with this code snippet?

2006-01-06 Thread LordLaraby
For what it's worth, GenerateRandomColour does not access any instance variables and therefore needn't even be a member of the class Population. If you wanted it there for encapsulation purposes, consider making it a staticmethod like so: @staticmethod() def GenerateRandomColour():

Re: smtplib error('Connection reset by peer')

2006-01-06 Thread LordLaraby
Do you actually run an SMTP server on your local machine and is it configured to accept mail on the localhost interface and does it allow mail forwarding such as you attempted? LL -- http://mail.python.org/mailman/listinfo/python-list

Re: is there a smaple to create syslog server on Windows.

2006-01-06 Thread LordLaraby
WIndows has a syslog server. It's called the Windows Event Log. No need to build a whole new one. *grin* Now... if you just want an app that listens on a log port and sends it's message to the Event Log, then I can't help you but to suggest that a *nix knowledgable programmer may help you write on

Re: CGI question

2006-01-06 Thread LordLaraby
sophie, If you have the URL in a variable, it's easy to parse it into it's components (one of which is the query string) like so: >>> from urllib2.urlparse import urlparse >>> urlparse( \ "http://[EMAIL PROTECTED]:8080/mytext.php;hellothere?this=test+value&and=that+one#anchor") ('http', '[EMAIL

Re: getting a KeyError:'href' any ideas?

2006-01-06 Thread LordLaraby
You wrote: > i have an > href which looks like this: > > http://www.cnn.com";> > > here is my code > for incident in row('td', {'class':'all'}): > n = incident.findNextSibling('a', {'class': 'btn'}) > link = incident.findNextSibling['href'] + "','" > an

Re: How to Retrieve Data from an HTTPS://URL

2006-01-06 Thread LordLaraby
You might be using ActiveState python on Windows? If so, you most likely do not have the SSL layer that's required to process HTTPS protocol queries. You should install 'standard' Python from python.org to get the SSL handling functionality. I understand that ActiveState can not distribute the SSL