Re: [Tutor] 6x6 word square solver too slow

2008-04-28 Thread Tim Peters
[Jeff Younker] >> I'd suggest googling for 'trie'. Tries are method of >> indexing sets of strings by prefix. [R. Alan Monroe] > Ah, will look it up. Or you can puzzle it out from the attached program ;-) > ... > In the meantime, my current version is > much improved - it caches rejects, so

[Tutor] RE: Debug C library in python program ‏(canceled )

2008-04-28 Thread tuyun
Sorry for this duplicated post, it's my mistake, plz ignore it Sorry From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: Debug C library in python program‏Date: Tue, 29 Apr 2008 01:24:44 + HiMay be this is a basic question, but I havent find answer through google :(I'm not familiar with python.

[Tutor] Debug C library in python program‏

2008-04-28 Thread tuyun
HiMay be this is a basic question, but I havent find answer through google :(I'm not familiar with python. I wrote a C library, and some body used the library in his python program, and found a bug of my library, I want to figure out what's wrong in my library.So how can I make a breakpoint for

Re: [Tutor] Menus with dictionaries or lists?

2008-04-28 Thread Arthur
#!/usr/bin/python # import csv file = csv.reader(open("file.txt", "r"),delimiter=';') for row in file: # now each row is a list #print row #print row[0] cntry=row[0] row[0]={} row[0]['country']=row[1] row[0]['county']=row[2] print 'for country',cntry, row[0] this is simple enough i guess

Re: [Tutor] Menus with dictionaries or lists?

2008-04-28 Thread Alan Gauld
"Norman Khine" <[EMAIL PROTECTED]> wrote I have a csv file as follows: "er";"Eritrea";"none";"none" "us";"United States of America";"Alabama";"Central Alabama" "uk";"United Kingdom";"East Anglia";"Cambridgeshire" "uk";"United Kingdom";"East Anglia";"Norfolk" "fr";"France";"Aquitaine";"Dordogne"

Re: [Tutor] Menus with dictionaries or lists?

2008-04-28 Thread Norman Khine
thanks for the link, but i was more interested in understanding lists and dictionaries thus I wanted to be able to see this on the command line. Arthur wrote: http://www.amk.ca/python/howto/curses/ ___ Tutor maillist - Tutor@python.org http://ma

Re: [Tutor] Menus with dictionaries or lists?

2008-04-28 Thread Arthur
http://www.amk.ca/python/howto/curses/ ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Menus with dictionaries or lists?

2008-04-28 Thread Norman Khine
Hello, I have a csv file as follows: "bi";"Burundi";"none";"none" "km";"Comoros";"none";"none" "dj";"Djibouti";"none";"none" "er";"Eritrea";"none";"none" "us";"United States of America";"Alabama";"Black Belt" "us";"United States of America";"Alabama";"Central Alabama" "us";"United States of Ameri

Re: [Tutor] Debug C library in python program

2008-04-28 Thread Dave Kuhlman
On Mon, Apr 28, 2008 at 07:03:16AM +, tuyun wrote: > > Hi > May be this is a basic question, but I havent find answer through google :( > I'm not familiar with python. I wrote a C library, and some body used the > library in his python program, and found a bug of my library, I want to > figu

Re: [Tutor] Stackless Python

2008-04-28 Thread Alan Gauld
"OkaMthembo" <[EMAIL PROTECTED]> wrote I was just wondering...does anybody think Stackless Python would be ideal for writing web apps, ie better for large systems? "ideal" and "better" are two very different things. While stackless might have some advantages over normal Python for large sca

Re: [Tutor] [tutor] how to call GSL function from python using ctype

2008-04-28 Thread ALAN GAULD
> it's just an exercise for using 3rd party software. > do you mean GSL is better than pygsl or pyMix? No, PyGSL is a Python interface to GSL so you don't need to use ctypes. PyMix is similar but offers more than just GSL. But if you actually want experience of ctypes then they aren't really r

Re: [Tutor] Debug C library in python program

2008-04-28 Thread Alan Gauld
"tuyun" <[EMAIL PROTECTED]> wrote I'm not familiar with python. I wrote a C library, and some body used the library in his python program, and found a bug ... So how can I make a breakpoint for a suspect function in my C library when he is "running in " a python program. Not cleanly. I t

[Tutor] Stackless Python

2008-04-28 Thread OkaMthembo
Hi guys, I was just wondering...doesanybody think Stackless Python would be ideal for writing web apps, ie better for large systems? And are there Python hosts that run Stackless? Regards, -- Lloyd Dube ___ Tutor maillist - Tutor@python.org http://m

Re: [Tutor] Debug C library in python program

2008-04-28 Thread Chris Fuller
I expect if you take that route, you would have to compile the Python interpreter with debugging enabled, and then run that with gdb. A better idea might be to recompile your library to produce debugging output at strategic locations, and then output it to the console or a socket to some logg

[Tutor] Debug C library in python program

2008-04-28 Thread tuyun
Hi May be this is a basic question, but I havent find answer through google :( I'm not familiar with python. I wrote a C library, and some body used the library in his python program, and found a bug of my library, I want to figure out what's wrong in my library. So how can I make a breakpoint f

Re: [Tutor] [tutor] how to call GSL function from python using ctype

2008-04-28 Thread Alan Gauld
"Kimbol Zhang" <[EMAIL PROTECTED]> wrote i'm trying to call the function from GSL by ctype , Any reason why you aren't using PyGSL or PyMix? Is there something in GSL that they don't give you? Alan G ___ Tutor maillist - Tutor@python.org http: