Re: How to "kill" orphaned threads at program exit

2008-12-28 Thread Giampaolo Rodola'
On 28 Dic, 18:47, Roy Smith wrote: > In article > , > "Giampaolo Rodola'" wrote: > > > Hi, > > I know that it's not possible to "kill" threads but I'm wondering if > > does exist some workaround for my problem. > > I have a test suite which does a massive usage of threads. > > Sometimes happens

Get a list of functions in a file

2008-12-28 Thread member Basu
I'm putting some utility functions in a file and then building a simple shell interface to them. Is their some way I can automatically get a list of all the functions in the file? I could wrap them in a class and then use attributes, but I'd rather leave them as simple functions. Thanks, Basu -- ht

Re: why cannot assign to function call

2008-12-28 Thread Erik Max Francis
scsoce wrote: I have a function return a reference, and want to assign to the reference, simply like this: >>def f(a) return a b = 0 * f( b ) = 1* but the last line will be refused as "can't assign to function call". In my thought , the assignment is very nature, but why the

Re: ftp design question

2008-12-28 Thread nemo
On Dec 29, 12:31 pm, Steve Holden wrote: > nemo wrote: > > Hi,all. > > I'm on a toy ftp project and I want it to be convinient for the user > > to cancel an undergoing downloading while continue others. The > > following code explains: > > for file in download_files: > >     self.ftp.retrbinary('R

Re: /kolab/bin/python: double free or corruption (fasttop)

2008-12-28 Thread Gabriel Genellina
En Mon, 29 Dec 2008 04:12:02 -0200, Gabriel Genellina escribió: En Sun, 28 Dec 2008 12:10:06 -0200, aspineux escribió: I got this. This is a test script, to help me to understand why I have unexpected result in application. But I got a more unexpected result, and probably wrong error mes

Re: Cheetah

2008-12-28 Thread Gabriel Genellina
En Sun, 28 Dec 2008 15:01:14 -0200, escribió: 1. In Cheetah 2.0.1, both from python 2.5.2 and 2.6, after I do a [...] 2. In reportlab 2.2, when I generate a PDF, no matter how many  s [...] Better to report those problems to each product authors. -- Gabriel Genellina -- http://mail.python

Re: parsing csv files class

2008-12-28 Thread alex goretoy
Tim, Thank you for your suggestions that you made. I will modify my class to what you said. I will also remove find_and_replace. seeing as I won't use it anywhere else. I think I put it there for some test and forgot to delete it. I was actually deleting the header outside of the class. This works

Re: why cannot assign to function call

2008-12-28 Thread r
On Dec 29, 12:01 am, scsoce wrote: > I have a function return a reference, and want to assign to the > reference, simply like this: >  >>def f(a) >           return a >      b = 0 >     * f( b ) = 1* > but the last line will be refused as "can't assign to function call". > In my thought , the assi

Re: /kolab/bin/python: double free or corruption (fasttop)

2008-12-28 Thread Gabriel Genellina
En Sun, 28 Dec 2008 12:10:06 -0200, aspineux escribió: I got this. This is a test script, to help me to understand why I have unexpected result in application. But I got a more unexpected result, and probably wrong error message about the read-only cursor. def server(): dbenv, db=init_db

Re: why cannot assign to function call

2008-12-28 Thread James Mills
On Mon, Dec 29, 2008 at 4:01 PM, scsoce wrote: > I have a function return a reference, and want to assign to the reference, > simply like this: >>>def f(a) > return a >b = 0 > * f( b ) = 1* > but the last line will be refused as "can't assign to function call". > In my thought , the

why cannot assign to function call

2008-12-28 Thread scsoce
I have a function return a reference, and want to assign to the reference, simply like this: >>def f(a) return a b = 0 * f( b ) = 1* but the last line will be refused as "can't assign to function call". In my thought , the assignment is very nature, but why the interpreter refu

Re: ftp EOF error, thread and process

2008-12-28 Thread Gabriel Genellina
En Sun, 28 Dec 2008 10:44:11 -0200, nemo escribió: My code like this raise an EOFError, It happens if I use the Process module, while, if I use thread.start_new_thread(ftp.pwd,()), it seems works well. And I wondered why. from ftplib import FTP import thread from multiprocessing import Process

Re: tkinter 3.0 multiple keyboard events together

2008-12-28 Thread Gabriel Genellina
En Sun, 28 Dec 2008 06:43:20 -0200, Pavel Kosina escribió: well, I am working on a tutorial for youngster (thats why i need to stay the code as easy as possible). In this game you are hunted by robots. I could use key"7" on numeric keypad for left-up moving but seems to me, that "4"+"8" is

Re: ctypes & strings

2008-12-28 Thread Gabriel Genellina
En Sun, 28 Dec 2008 08:59:03 -0200, Hendrik van Rooyen escribió: "Gabriel Genellina" wrote: Hmmm, I don't think posting a potentially harmful example is actually a good idea... True - its my only example though, and nobody else was bothering to reply, so I kicked off and flushed out some r

Otra vez Python en xkcd

2008-12-28 Thread Gabriel Genellina
Hola En el especial de Navidad de este año: http://xkcd.com/521/ -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list

Re: How to display Chinese in a list retrieved from database via python

2008-12-28 Thread zxo102
On 12月27日, 下午4时08分, "Gabriel Genellina" wrote: > En Sat, 27 Dec 2008 03:03:24 -0200,zxo102 escribió: > > > > > On 12月26日, 下午3时16分, "Mark Tolonen"   > > wrote: > > >> I was able to display 中文 successfully with this code: > > >> f=open('test.html','wt') > >> f.write(''' > >> > >> test > >> \xd6\xd

Re: How to "kill" orphaned threads at program exit

2008-12-28 Thread Gabriel Genellina
En Sun, 28 Dec 2008 15:47:24 -0200, Roy Smith escribió: In article , "Giampaolo Rodola'" wrote: I know that it's not possible to "kill" threads but I'm wondering if does exist some workaround for my problem. I have a test suite which does a massive usage of threads. Sometimes happens that o

Re: ftp design question

2008-12-28 Thread Steve Holden
nemo wrote: > Hi,all. > I'm on a toy ftp project and I want it to be convinient for the user > to cancel an undergoing downloading while continue others. The > following code explains: > for file in download_files: > self.ftp.retrbinary('RETR '+file, fileHandler) > Thers seems not a solid way

ftp design question

2008-12-28 Thread nemo
Hi,all. I'm on a toy ftp project and I want it to be convinient for the user to cancel an undergoing downloading while continue others. The following code explains: for file in download_files: self.ftp.retrbinary('RETR '+file, fileHandler) Thers seems not a solid way to cancel this transfer an

HTML Correctness and Validators

2008-12-28 Thread Xah Lee
recently i wrote a blog essay about html correctness and html validators, with relations to the programing lang communities. I hope programing lang fans will take more consideration on the correctness of the doc they produces. HTML Correctness and Validators • http://xahlee.org/js/html_correctness

Re: How to get involved

2008-12-28 Thread Ben Finney
kajnilss...@hotmail.com writes: > I'm new to the open source comunnity and I was wondering if there are > any bugs that I can trouble shoot or just some beginner tasks I can be > sent? Here are some pointers to how you can assist Python: http://wiki.python.org/moin/Advocacy> http://wiki.

ZSI - ServiceContainer

2008-12-28 Thread Stephen Chapman
Does Anyone know how to Make the ServiceContainer work under SSL Thanks -- http://mail.python.org/mailman/listinfo/python-list

Need help getting MoinMoin to run under SCGI

2008-12-28 Thread Ron Garret
So I have a MoinMoin installation running as a cgi and also under wsgi. Since I was on a roll I decided to press my luck and try running it under scgi. Following a suggestion in the following article: http://www.linuxjournal.com/article/9310 I wrote this little server adapter: from MoinMo

[ANN] PyYAML-3.07: YAML parser and emitter for Python

2008-12-28 Thread Kirill Simonov
Announcing PyYAML-3.07 A new release of PyYAML is now available: http://pyyaml.org/wiki/PyYAML Changes === * The emitter learned to use an optional indentation indicator for block scalars; thus scalars with leading whitespaces cou

RE: error on windows with commands.getstatusoutput

2008-12-28 Thread Lee Harr
>> cmd = '%s -y %s -l %s' % (conf.twistd, conf.tztac, conf.twistdlog) >> status, output = commands.getstatusoutput(cmd) > The commands module is Unix only. See its documentation : > http://docs.python.org/library/commands.html Ah. Doh! I was going back and forth between all of the different wa

RE: game engine (as in rules not graphics)

2008-12-28 Thread Phil Runciman
See: Chris Moss, Prolog++: The Power of Object-Oriented and Logic Programming (ISBN 0201565072) This book is a pretty handy intro to an OO version Prolog produced by Logic Programming Associates. Prolog is a wonderful tool for such things as working out a factory layout for new car producti

Re: multiply each element of a list by a number

2008-12-28 Thread Colin J. Williams
s...@pobox.com wrote: Colin> ... perhaps faster than numpy: ... For extremely short lists, but not for much else: % for n in 1 10 100 1000 1 10 ; do > echo "len:" $n > echo -n "numpy: " > python -m timeit -s 'import numpy ; a = numpy.array(range('$n'))' 'a*

Any equivalent to Ruby's 'hpricot' html/xpath/css selector package?

2008-12-28 Thread Kenneth McDonald
Ruby has a package called 'hpricot' which can perform limited xpath queries, and CSS selector queries. However, what makes it really useful is that it does a good job of handling the "broken" html that is so commonly found on the web. Does Python have anything similar, i.e. something that w

Re: "return" in def

2008-12-28 Thread Roger
On Dec 28, 5:12 pm, John Machin wrote: > On Dec 29, 7:06 am, Roger wrote: > > > > > > Curious. When I see a bare return, the first thing I think is that the > > > author forgot to include the return value and that it's a bug. > > > > The second thing I think is that maybe the function is a genera

Python 3.0 Curses Unicode

2008-12-28 Thread Damian Johnson
Hi, I've switched to Python 3.0 for a new Japanese vocab quizzing application due to its much improved Unicode support. However, I'm running into an issue with displaying Unicode characters via curses. In Python 2.x a simple hello-world looks like: #!/usr/bin/python # coding=UTF-8 import curses i

Re: Need help getting MoinMoin to run under WSGI

2008-12-28 Thread Ron Garret
In article , Graham Dumpleton wrote: > On Dec 28, 7:22 pm, Ron Garret wrote: > > In article , > >  Ron Garret wrote: > > > > > > > > > I successfully installed MoinMoin as a CGI according to the instructions > > > on the moinmo.in site.  But when I tried to switch over to running it > > > und

Re: "return" in def

2008-12-28 Thread John Machin
On Dec 29, 7:06 am, Roger wrote: > > Curious. When I see a bare return, the first thing I think is that the > > author forgot to include the return value and that it's a bug. > > > The second thing I think is that maybe the function is a generator, and > > so I look for a yield. If I don't see a y

Re: "return" in def

2008-12-28 Thread John Machin
On Dec 29, 8:36 am, Benjamin wrote: > On Dec 28, 1:35 pm, Steven D'Aprano > cybersource.com.au> wrote: > > The second thing I think is that maybe the function is a generator, and > > so I look for a yield. > > You shouldn't, though; Generators can't contain any return statement. What gave you th

Re: "return" in def

2008-12-28 Thread Robert Kern
Benjamin wrote: On Dec 28, 1:35 pm, Steven D'Aprano wrote: The second thing I think is that maybe the function is a generator, and so I look for a yield. You shouldn't, though; Generators can't contain any return statement. Yes, they can. It doesn't return a value, it just raises a StopIter

Re: "return" in def

2008-12-28 Thread Benjamin
On Dec 28, 1:35 pm, Steven D'Aprano wrote: > The second thing I think is that maybe the function is a generator, and > so I look for a yield. You shouldn't, though; Generators can't contain any return statement. -- http://mail.python.org/mailman/listinfo/python-list

Re: error on windows with commands.getstatusoutput

2008-12-28 Thread Pierre Bourdon
The commands module is Unix only. See its documentation : http://docs.python.org/library/commands.html On Sun, Dec 28, 2008 at 10:03 PM, Lee Harr wrote: > > My application is trying to start twistd in a cross-platform way. > > Unfortunately, it works fine on my linux system, but I do not > have w

error on windows with commands.getstatusoutput

2008-12-28 Thread Lee Harr
My application is trying to start twistd in a cross-platform way. Unfortunately, it works fine on my linux system, but I do not have windows, and I am trying to debug this remotely on a system I never use :o( Anyhow, here is the error I am getting: cmd = '%s -y %s -l %s' % (conf.twistd, conf.t

A form validation library with javascript validation

2008-12-28 Thread Grigory Temchenko
Hey everyone, Can someone advice me a beautiful or just cool library for form validation with javascript supporting? -- http://mail.python.org/mailman/listinfo/python-list

Re: tkinter 3.0 multiple keyboard events together

2008-12-28 Thread janislaw
On 28 Gru, 09:43, Pavel Kosina wrote: > well, I am working on a tutorial for youngster (thats why i need to stay > the code as easy as possible). In this game you are hunted by robots. I > could use key"7" on numeric keypad for left-up moving but seems to me, > that "4"+"8" is much more standard f

Re: "return" in def

2008-12-28 Thread Roger
> Curious. When I see a bare return, the first thing I think is that the > author forgot to include the return value and that it's a bug. > > The second thing I think is that maybe the function is a generator, and > so I look for a yield. If I don't see a yield, I go back to thinking > they've left

Apache/mod_python: Registering a request handler dynamically

2008-12-28 Thread Samuel
Hi, Is there a way to dynamically overwrite the request handler from within mod_python scripts? Something along those lines: --- from mod_python import apache def myhandler(request): request.content_type = 'text/plain' request.write('Hello world') apache.set_default_handler

Re: "return" in def

2008-12-28 Thread Steven D'Aprano
On Sun, 28 Dec 2008 12:38:50 -0500, Steve Holden wrote: > Roger wrote: >> Hi Everyone, >> >> First I want to thank everyone that posts to this group. I read it >> daily and always learn something new even if I never feel like I have >> anything to contribute but my questions. >> >> When I defin

Re: "return" in def

2008-12-28 Thread MRAB
Gerard Flanagan wrote: On Dec 28, 5:19 pm, Roger wrote: Hi Everyone, [...] When I define a method I always include a return statement out of habit even if I don't return anything explicitly: def something(): # do something return Is this pythonic or excessive? Is this an un

Re: "return" in def

2008-12-28 Thread Manish Sinha
Roger wrote: Hi Everyone, First I want to thank everyone that posts to this group. I read it daily and always learn something new even if I never feel like I have anything to contribute but my questions. Same here, I always read the news, but hardly post anything since am not very much expe

Re: math module for Decimals

2008-12-28 Thread jerry . carl . mi
mpmath... wow... just did what i needed :-) Thanks, Mark! Hopefully i did not waste too much of your time... and perhaps this discussion will send other lost sheeps in the right direction. (Still, it would make sense to have the goniometric functions in decimal.) -- http://mail.python.org/mai

Re: "return" in def

2008-12-28 Thread Bruno Desthuilliers
Roger a écrit : When I define a method I always include a return statement out of habit even if I don't return anything explicitly: def something(): # do something return Is this pythonic or excessive? If it's the last statement in the function body, it is indeed "excessive

Re: "return" in def

2008-12-28 Thread Gerard Flanagan
On Dec 28, 5:19 pm, Roger wrote: > Hi Everyone, [...] > When I define a method I always include a return statement out of > habit even if I don't return anything explicitly: > > def something(): >         # do something >         return > > Is this pythonic or excessive?  Is this an unnecessary af

Re: How to "kill" orphaned threads at program exit

2008-12-28 Thread Roy Smith
In article , "Giampaolo Rodola'" wrote: > Hi, > I know that it's not possible to "kill" threads but I'm wondering if > does exist some workaround for my problem. > I have a test suite which does a massive usage of threads. > Sometimes happens that one test fails, the test suite keeps running >

Re: "return" in def

2008-12-28 Thread Steve Holden
Roger wrote: > Hi Everyone, > > First I want to thank everyone that posts to this group. I read it > daily and always learn something new even if I never feel like I have > anything to contribute but my questions. > > When I define a method I always include a return statement out of > habit even

Re: "return" in def

2008-12-28 Thread r
On Dec 28, 11:19 am, Roger wrote: > Hi Everyone, > > First I want to thank everyone that posts to this group.  I read it > daily and always learn something new even if I never feel like I have > anything to contribute but my questions. > > When I define a method I always include a return statement

How to "kill" orphaned threads at program exit

2008-12-28 Thread Giampaolo Rodola'
Hi, I know that it's not possible to "kill" threads but I'm wondering if does exist some workaround for my problem. I have a test suite which does a massive usage of threads. Sometimes happens that one test fails, the test suite keeps running until the end, and when it's finished the program hangs

"return" in def

2008-12-28 Thread Roger
Hi Everyone, First I want to thank everyone that posts to this group. I read it daily and always learn something new even if I never feel like I have anything to contribute but my questions. When I define a method I always include a return statement out of habit even if I don't return anything e

reportlab

2008-12-28 Thread sopherfish
In reportlab 2.2, when I generate a PDF, no matter how many  s I put it, I only get one space. I am using it with python 2.6. The PDF generates fine and one $nbsp works, but for some reason, when I put it in multiple times, I still only get one space. -- http://mail.python.org/mailman/listinfo/pyth

Cheetah

2008-12-28 Thread sopherfish
1. In Cheetah 2.0.1, both from python 2.5.2 and 2.6, after I do a #from datetime import date, most of the datetime objects seem to work fine. For example, $date(2008, 12, 15) works. However $date.today() does not work and I get an exception required argument year not found. In Python both 2.5.2 and

Re: math module for Decimals

2008-12-28 Thread jerry . carl . mi
> 1. mpmath? > 2. sympy? > 3. Sage? Haven't tried those, i guess i have some studying to do. > > > x=Decimal.__mod__(x,Decimal('2')*pi()) > > > Works fine for what i need, but i am sure it's not the right way to do > > it. > > I don't know of any better way to deal with large arguments. > The m

Re: math module for Decimals

2008-12-28 Thread Mark Dickinson
On Dec 28, 3:55 pm, jerry.carl...@gmail.com wrote: > But i am after the extra precision: > > >>> from math import * > >>> (1+1e-16)-1 > > 0.0 Sounds like you don't care too much about the base-10 part, so there may be other solutions out there. Have you tried: 1. mpmath? 2. sympy? 3. Sage? Any

Re: math module for Decimals

2008-12-28 Thread jerry . carl . mi
> - are you using Decimal for the base-10-ness or the >   extra precision Decimal provides?  Or significant zeros? >   Or compatibility with existing Decimal code, or what? Oh boy, now I will finally prove myself illiterate... well, so be it. But i am after the extra precision: >>> from math imp

Re: math module for Decimals

2008-12-28 Thread Mark Dickinson
On Dec 28, 7:28 am, Steven D'Aprano wrote: > Ah crap, I forgot that from_float() has been left out of the decimal API. > That's very annoying. Agreed. It's maybe even annoying enough that a feature request at bugs.python.org might be honoured. (Hint, hint!) It's fairly easy to emulate in Pytho

Re: math module for Decimals

2008-12-28 Thread Mark Dickinson
On Dec 28, 12:02 am, jerry.carl...@gmail.com wrote: > I have been looking for a Python module with math functions that would > both eat and spit Decimals. The standard math module eats Decimals > allright but spits floats. Yes: it just converts the input (whether float, int, Fraction or Decimal) t

Re: sys.stdout.write()'s bug or doc bug?

2008-12-28 Thread Steven D'Aprano
On Sun, 28 Dec 2008 02:37:55 -0800, Qiangning Hong wrote: >> > So, my question is, as sys.stdout IS a file object, why it does not >> > use its encoding attribute to convert the given unicode? An >> > implementation bug? A documenation bug? >> >> hmm I always thought "sys.stdout" is a "file-like

Re: strange behavior of math.sqrt() in new 3.0 version

2008-12-28 Thread Steve Holden
Tim Roberts wrote: > Scott David Daniels wrote: >> I avoid using single-letter variables except where I know the types >>from the name (so I use i, j, k, l, m, n as integers, s as string, >> and w, x, y, and z I am a little looser with (but usually float or >> complex). > > It's amazing to me tha

/kolab/bin/python: double free or corruption (fasttop)

2008-12-28 Thread aspineux
I got this. This is a test script, to help me to understand why I have unexpected result in application. But I got a more unexpected result, and probably wrong error message about the read-only cursor. The full script is at the end. db cleanup, 326 records deleted, 9990 remains Exception in threa

Re: math module for Decimals

2008-12-28 Thread jerry . carl . mi
Hi Steven... thanks for your kind and extensive reply. Lots of good food for thought. I know it's easy to complain about lack of functionality, but it really was not my intention. Python is very cool as it is and I still know too little about it to even suggest anything. I just thought maybe I was

Re: What is site-packages?

2008-12-28 Thread Marek Kubica
On Sun, 28 Dec 2008 04:06:36 -0800, Hussein B wrote: > You mean like MoinMoin, Django or Pylons for example? Yes. Or lxml, BeautifulSoup, psycopg2 and basically anything that is available on PyPI. regards, Marek -- http://mail.python.org/mailman/listinfo/python-list

ftp EOF error, thread and process

2008-12-28 Thread nemo
Hi all, My code like this raise an EOFError, It happens if I use the Process module, while, if I use thread.start_new_thread(ftp.pwd,()), it seems works well. And I wondered why. from ftplib import FTP import thread from multiprocessing import Process if __name__ == '__main__': ftp = FTP('loc

Re: What is site-packages?

2008-12-28 Thread Hussein B
On Dec 28, 2:04 pm, "Chris Rebert" wrote: > On Sun, Dec 28, 2008 at 3:40 AM, Hussein B wrote: > > Hey, > > What is /usr/lib/pythonx.y/site-packages folder and for what it is > > used usually? > > I believe it's where third-party libraries are typically installed to. > > Cheers, > Chris > > -- > F

Re: What is site-packages?

2008-12-28 Thread Chris Rebert
On Sun, Dec 28, 2008 at 3:40 AM, Hussein B wrote: > Hey, > What is /usr/lib/pythonx.y/site-packages folder and for what it is > used usually? I believe it's where third-party libraries are typically installed to. Cheers, Chris -- Follow the path of the Iguana... http://rebertia.com -- http://m

What is site-packages?

2008-12-28 Thread Hussein B
Hey, What is /usr/lib/pythonx.y/site-packages folder and for what it is used usually? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: ctypes & strings

2008-12-28 Thread Hendrik van Rooyen
"Gabriel Genellina" wrote: >Hmmm, I don't think posting a potentially harmful example is actually a >good idea... True - its my only example though, and nobody else was bothering to reply, so I kicked off and flushed out some response. Who was it that said that the way to get info out of usen

Re: assignment with [:]

2008-12-28 Thread James Stroud
James Stroud wrote: py> a = [1, 2, 3] py> a1 = a py> a1[:] = [x*3 for x in a1] py> a1 [3, 6, 9] py> a1 [3, 6, 9] This should have been: py> a = [1, 2, 3] py> a1 = a py> a1[:] = [x*3 for x in a1] py> a [3, 6, 9] py> a1 [3, 6, 9] James -- James Stroud UCLA-DOE Institute for

Re: assignment with [:]

2008-12-28 Thread James Stroud
Ben Bush wrote: On Dec 26, 4:46 pm, Tim Chase wrote: What does *not* work is 3 * [0,1,2] As you know, this gives [0,1,2,0,1,2,0,1,2] What I am hoping for is [0,3,6] I see that I can use numpy.multiply(3,range(3)) but this seems overkill to me. Can you tell I am

Re: sys.stdout.write()'s bug or doc bug?

2008-12-28 Thread Qiangning Hong
On Dec 27, 12:31 am, Martin wrote: > Python 2.4.4 (#2, Oct 22 2008, 19:52:44) > [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> u = u"\u554a" > >>> print u > 啊 > >>> sys.stdout.write(u + "\n") > > Tracebac

Re: Need help getting MoinMoin to run under WSGI

2008-12-28 Thread Graham Dumpleton
On Dec 28, 7:22 pm, Ron Garret wrote: > In article , >  Ron Garret wrote: > > > > > I successfully installed MoinMoin as a CGI according to the instructions > > on the moinmo.in site.  But when I tried to switch over to running it > > under wsgi it failed thusly: > > > [Sat Dec 27 21:44:14 2008]

Re: Doing set operation on non-hashable objects

2008-12-28 Thread 5lvqbwl02
On Dec 24, 12:21 pm, "Gabriel Genellina" wrote: > En Wed, 24 Dec 2008 17:16:59 -0200, <5lvqbw...@sneakemail.com> escribió: > > > I'm writing an application which is structured roughly as follows: > > > "db" is a dict, where the values are also dicts. > > A function searches through db and returns

Re: Doing set operation on non-hashable objects

2008-12-28 Thread 5lvqbwl02
> > ... "db" is a dict, where the values are also dicts. > > A function searches through db and returns a list of values, each of > > which is a dict as described above. > > I need to perform set operations on these lists (intersection and > > union) > > However the objects themselves are not hasha

Re: tkinter 3.0 multiple keyboard events together

2008-12-28 Thread Pavel Kosina
janislaw napsal(a): Um, I could be only guessing what are you meant to do, unless you describe your problem in more detailed way. I.e. describe the desired behaviour, show code which you have, and describe the current behaviour. well, I am working on a tutorial for youngster (thats why i ne

Re: Need help getting MoinMoin to run under WSGI

2008-12-28 Thread Ron Garret
In article , Ron Garret wrote: > I successfully installed MoinMoin as a CGI according to the instructions > on the moinmo.in site. But when I tried to switch over to running it > under wsgi it failed thusly: > > [Sat Dec 27 21:44:14 2008] [error] [client 66.214.189.2] Traceback (most > rece

Re: math module for Decimals

2008-12-28 Thread Steven D'Aprano
On Sat, 27 Dec 2008 21:50:09 -0800, jerry.carl.mi wrote: >> Which math functions? ln, log10, exp, sqrt already exist as methods of >> Decimal instances. At the end of the Decimal docs there are a few >> examples, including computing sin and cos (but apparently they naïvely >> use a McLaurin series