Re: [Tutor] What kind of approach

2007-03-26 Thread Utkarsh Tandon
Allan Gauld wrote: > Thats a very long winded and difficult way to do a fairly simple > Python task. Don't try to write Python like a C programmer. I'm really new to python. And I don't have much experience in programming either So umm, what kind of approach should I have when coding programs in P

[Tutor] Webform

2007-03-26 Thread Øyvind
Hello. I am trying to fill in a webform, and have tried using Clientform/mechanize, but cannot seem to get it right. Here is the code: from urllib2 import urlopen import ClientForm from ClientForm import ParseResponse response = urlopen("http://www.datateam.no/boc/bocadresse.nsf/wMedlemsoek?Open

Re: [Tutor] nube question...

2007-03-26 Thread Dick Moores
At 06:23 PM 3/26/2007, Dick Moores wrote: >At 09:54 PM 3/23/2007, Lurch wrote: >>I've ripped code from Mark Lutz's book (3rd edition), > >I suppose you mean < http://tinyurl.com/2shcmj>? > >> from Welch's book (also 3rd edition), and from around the net. > >Title, please? Ah, found it. Practical

Re: [Tutor] nube question...

2007-03-26 Thread Dick Moores
At 09:54 PM 3/23/2007, Lurch wrote: I've ripped code from Mark Lutz's book (3rd edition), I suppose you mean < http://tinyurl.com/2shcmj>?  from Welch's book (also 3rd edition), and from around the net. Title, please? Thanks, Dick Moores ___ Tutor

Re: [Tutor] Filesystem vs Database vs Lucene

2007-03-26 Thread Alan Gauld
"Shitiz Bansal" <[EMAIL PROTECTED]> wrote > I need to implement a system which stores Strings(average length 50 > chars). > For every input String it would need to tell the user wether that > string > already exists in the system. It would also need to add that input > String to the system if it

Re: [Tutor] Filesystem vs Database vs Lucene

2007-03-26 Thread Christopher Arndt
Shitiz Bansal schrieb: > I need to implement a system which stores Strings(average length 50 chars). > I was wondering what would be the most efficient(timewise) solution for > this riddle. I'd use pysqlite, a SQL database in a file. > For every input String it would need to tell the user wether

[Tutor] Filesystem vs Database vs Lucene

2007-03-26 Thread Shitiz Bansal
Hi, I need to implement a system which stores Strings(average length 50 chars). For every input String it would need to tell the user wether that string already exists in the system. It would also need to add that input String to the system if it did not exist. It will also be useful to know the

Re: [Tutor] Unicode in List Object

2007-03-26 Thread Tim Golden
Roman Kreuzhuber wrote: > Thanks for the quick response! > I see! Oh I didn't realize that it's not the list which raises an error. > For a test I tried to insert a string containing a unicode character as > follows: > > ListObject = [] > ListObject.insert(0,u"Möälasdji") By the way, aside from

Re: [Tutor] Unicode in List Object

2007-03-26 Thread Tim Golden
Andre Engels wrote: > 2007/3/26, Roman Kreuzhuber <[EMAIL PROTECTED]>: >> >> Thanks for the quick response! >> I see! Oh I didn't realize that it's not the list which raises an error. >> For a test I tried to insert a string containing a unicode character as >> follows: >> >> ListObject = [] >> Lis

Re: [Tutor] Unicode in List Object

2007-03-26 Thread Kent Johnson
Roman Kreuzhuber wrote: > Thanks for the quick response! > I see! Oh I didn't realize that it's not the list which raises an error. > For a test I tried to insert a string containing a unicode character as > follows: > > ListObject = [] > ListObject.insert(0,u"Möälasdji") > > which raises: "Synt

Re: [Tutor] Unicode in List Object

2007-03-26 Thread Andre Engels
2007/3/26, Roman Kreuzhuber <[EMAIL PROTECTED]>: Thanks for the quick response! I see! Oh I didn't realize that it's not the list which raises an error. For a test I tried to insert a string containing a unicode character as follows: ListObject = [] ListObject.insert(0,u"Möälasdji") which rais

Re: [Tutor] Unicode in List Object

2007-03-26 Thread Roman Kreuzhuber
Thanks for the quick response! I see! Oh I didn't realize that it's not the list which raises an error. For a test I tried to insert a string containing a unicode character as follows: ListObject = [] ListObject.insert(0,u"Möälasdji") which raises: "SyntaxError: Non-ASCII character '\xfc' in fil

[Tutor] 3 recent short essays by Kent Johnson

2007-03-26 Thread Dick Moores
"Python Decorators," "The path module" and "List Comprehensions." Dick Moores ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Unicode in List Object

2007-03-26 Thread Tim Golden
Roman Kreuzhuber wrote: > I want to store multiple inputs from text fields in a list-object, which > works as a very small databank. The problem is that this data will contain > unicode characters I'm not sure why you think this is a problem. A Python list can hold anything, including unicode

[Tutor] Unicode in List Object

2007-03-26 Thread Roman Kreuzhuber
Hello! I need some help: I want to store multiple inputs from text fields in a list-object, which works as a very small databank. The problem is that this data will contain unicode characters as i live in a german-speaking country. I've searched through the internet for days but without any succ