Improve reduce functions of SQLite3 request

2013-02-03 Thread Steffen Mutter
Hi, I am writing some code to manage handball leagues more easy. Problem: MISSON: Get single club ids glued together with the shortest teamname. EXAMPLE: SELECT homenr as nr, home as club FROM Runde20122013 WHERE place="karlsruhe" UNION SELECT guestnr as nr, guest as club FROM 20122013 WHERE pl

Re: mySQLdb

2013-02-03 Thread Steffen Mutter
Hi Armin, Armin Karner wrote: > I am curious if there is an update of MySQLdb for python versions 3.3 or > higher. Because I really need this for a diploma thesis.  What feature do you need which is not provided? > I really hope you have a solution for me, because it is quite urgent and > imp

Re: ERROR:root:code for hash md5 was not found

2013-02-03 Thread Ibad Kureshi U0850037
Hello, I am bit new to python and am struggling to install NumPy and SciPy on to Python 2.7. Based on my understanding I believe that the problem is with my Python install rather than the way I am installing NumPy. I have seen only two other threads that deal with this issue but both threads ju

Re: PyGresql 4.1.1 for python2.7

2013-02-03 Thread alexandra
Using dependency walker revealed that the following are missing from libpq: PQescapeLiteral PQescapeIdentifier These are only defined in postgresql 9. Documentation states that PyGresql 4.1.1 is compatible with PostgreSQL 8.3 or higher and I'm using 8.4. Has

How does help() indent doc strings?

2013-02-03 Thread Roy Smith
I'm trying to use argparse.RawDescriptionHelpFormatter to get my epilog string formatted the way I want. This works: def parse_cli(): epilog = """\ This my very long epilog string which goes on for several lines. """ parser = argparse.ArgumentP

how to change system-wide proxy settings by Python ?

2013-02-03 Thread iMath
I have already known a valid proxy server(63.141.216.159)and port(8087) which support both http and https protocols ,so how to change system-wide proxy settings to this proxy by Python ? I use WinXP ,can you show me an example of this ? thanks in advance ! -- http://mail.python.org/mailman/list

Re: how to change system-wide proxy settings by Python ?

2013-02-03 Thread Kwpolska
On Sun, Feb 3, 2013 at 4:34 PM, iMath wrote: > I have already known a valid proxy server(63.141.216.159)and port(8087) which > support both http and https protocols ,so how to change system-wide proxy > settings to this proxy by Python ? > I use WinXP ,can you show me an example of this ? > tha

Re: Formatting a column's value output

2013-02-03 Thread Jason Friedman
> One of the difficulties on this list is that we don't have > two-dimensional people. Even our worst trolls have some redeeming > features. I can't just dismiss Ferrous out of hand... Indeed, and that is a "problem" with humanity in general. It is proof that God (or the universe) has a sense of h

Re: how to change system-wide proxy settings by Python ?

2013-02-03 Thread Michael Torrie
On 02/03/2013 08:34 AM, iMath wrote: > I have already known a valid proxy server(63.141.216.159)and > port(8087) which support both http and https protocols ,so how to > change system-wide proxy settings to this proxy by Python ? I use > WinXP ,can you show me an example of this ? thanks in advanc

Re: How does help() indent doc strings?

2013-02-03 Thread Steven D'Aprano
Roy Smith wrote: > It would be much nicer to be able to do: > > epilog = """This my very long epilog string > which goes on for several lines. > """ > > and have dedent() figure out the indenting like help() does for > docstrings. How can I do that (in python

__getattr__ Confusion

2013-02-03 Thread Saul Spatz
To the good people on comp.lang.python: I have the following Tkinter class (python 2.7.3): from Tkinter import * class ScrolledCanvas(Frame): def __init__(self, master, width, height, bg, cursor): Frame.__init__(self, master) self.__nonzero__ = lambda: True canv = self.canvas = Can

Re: __getattr__ Confusion

2013-02-03 Thread Chris Angelico
On Mon, Feb 4, 2013 at 12:08 PM, Saul Spatz wrote: > class ScrolledCanvas(Frame): > def __init__(self, master, width, height, bg, cursor): > canv = self.canvas = Canvas(self, bg=bg, relief=SUNKEN) > > def __getattr__(self, name): > return getattr(self.canvas, name) Trying to get my he

Re: __getattr__ Confusion

2013-02-03 Thread Terry Reedy
On 2/3/2013 8:08 PM, Saul Spatz wrote: To the good people on comp.lang.python: I have the following Tkinter class (python 2.7.3): from Tkinter import * class ScrolledCanvas(Frame): def __init__(self, master, width, height, bg, cursor): Frame.__init__(self, master) self.__nonzero__ = lambda: Tr

Re: __getattr__ Confusion

2013-02-03 Thread Steven D'Aprano
On Sun, 03 Feb 2013 17:08:47 -0800, Saul Spatz wrote: > I don't understand what's going on at all. Can't I dynamically define > __getattr__? How should I go about it? Special "dunder" methods (DoubleUNDERscore) are looked up only on the class, not on instances. That means that if you try to

Re: Formatting a column's value output

2013-02-03 Thread Steven D'Aprano
On Sun, 03 Feb 2013 09:18:42 -0800, Jason Friedman wrote: >> One of the difficulties on this list is that we don't have >> two-dimensional people. Even our worst trolls have some redeeming >> features. I can't just dismiss Ferrous out of hand... > > Indeed, and that is a "problem" with humanity i