Re: Reading XML namespaces

2010-05-15 Thread Stefan Behnel
Martin v. Loewis, 15.05.2010 23:37: BTW, I'm still not sure I understand your problem. Could you provide some more details? Wouldn't it be easier if you told the OP how to access the prefix mappings in lxml etree, or, if this was actually not possible, admitted that it is actually not possible?

[ANN] Benchmarker 1.0.0 - a samll utility for benchmarking

2010-05-15 Thread kwatch
Hi, I released Benchmarker 1.0.0. http://pypi.python.org/pypi/Benchmarker/ Benchmarker is a small library for benchmarking. Example --- ex.py:: def fib(n): return n <= 2 and 1 or fib(n-1) + fib(n-2) from benchmarker import Benchmarker bm = Benchmarker() # or Benchmark

Re: Access to comp.lang.python

2010-05-15 Thread James Mills
On Sun, May 16, 2010 at 3:12 PM, Aahz wrote: > It's also at least partly due to problems with mail<->news gateways and > the differing fields used to maintain threading. Some blame goes on MUAs too :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Access to comp.lang.python

2010-05-15 Thread Aahz
In article , Terry Reedy wrote: >On 5/15/2010 6:34 PM, cjw wrote: >> >> The problem is that many messages seem to get unlinked from their threads. > >Some people have said that that is due to newreaders not tagging >responses properly. It's also at least partly due to problems with mail<->news

Re: Access to comp.lang.python

2010-05-15 Thread Terry Reedy
On 5/15/2010 6:34 PM, cjw wrote: This isn't about Python but I'm seeking suggestions as to the best way to access the newsgroup. It seems that messages are coming from a number of sources, such as gmane and google groups. The problem is that many messages seem to get unlinked from their threads

Re: Is Python a functional programming language?

2010-05-15 Thread Paul Rubin
travis+ml-pyt...@subspacefield.org writes: > To be fair, it appears that Python's whitespace-sensitive syntax sort > of precludes the "make a complex function on one line" that is typical > of languages which don't have statement/expression distinctions, but > I'm not convinced it couldn't be solve

Re: Picking a license

2010-05-15 Thread Robert Kern
On 2010-05-15 22:05 , Lawrence D'Oliveiro wrote: In message , Patrick Maupin wrote: On May 14, 9:21 pm, Lawrence D'Oliveiro wrote: In message, Ed Keith wrote: I just refuse to use [the GPL] in any code for a client, because I do not want to require someone who does not know source code fro

Re: Reading XML namespaces

2010-05-15 Thread Adam Tauno Williams
On Sun, 2010-05-16 at 02:37 +0200, Martin v. Loewis wrote: > > ??? The namespaces are embedded in the document. Personally I find it > > odd I have to tell xpath about the namespace of the document it is a > > $*&@(*& method of. > How so? Why do you say it's a "method", and why do you say "of"? >

Re: Reading XML namespaces

2010-05-15 Thread Adam Tauno Williams
On Sat, 2010-05-15 at 23:37 +0200, Martin v. Loewis wrote: > > BTW, I'm still not sure I understand your problem. Could you provide > > some more details? > Wouldn't it be easier if you told the OP how to access the prefix :) > mappings in lxml etree, or, if this was actually not possible, admitt

Re: Picking a license

2010-05-15 Thread Lawrence D'Oliveiro
In message , Ed Keith wrote: > But if my client give someone else a copy of the binary I gave them, they > are now in violation. Why would they be in violation? It seems to me a violation would only occur if someone asked them for the source, and they refused. -- http://mail.python.org/mailman

Re: Picking a license

2010-05-15 Thread Lawrence D'Oliveiro
In message <93d67bd9-6721-4759-a3de-412b95b29...@c11g2000vbe.googlegroups.com>, Paul Boddie wrote: > Although Bill Gates once apparently claimed that no-one needs the > source code for their word processor or office suite ... Thereby committing the sealed-bonnet fallacy. -- http://mail.python.o

Re: Picking a license

2010-05-15 Thread Lawrence D'Oliveiro
In message , Ed Keith wrote: > On Fri, 5/14/10, Lawrence D'Oliveiro > wrote: > >> In message , >> Ed Keith wrote: >> >>> Yes, under the GPL every one has one set of freedoms, >>> under the MIT or Boost license every one has more freedoms. Under other >>> licenses they have fewer freedoms. >>

Re: Picking a license

2010-05-15 Thread Lawrence D'Oliveiro
In message , Patrick Maupin wrote: > On May 14, 9:21 pm, Lawrence D'Oliveiro central.gen.new_zealand> wrote: > >> In message , Ed >> Keith wrote: >> >>> I just refuse to use [the GPL] in any code for a client, because I >>> do not want to require someone who does not know source code from Morse

Re: Reading XML namespaces

2010-05-15 Thread Martin v. Loewis
> ??? The namespaces are embedded in the document. Personally I find it > odd I have to tell xpath about the namespace of the document it is a > $*&@(*& method of. How so? Why do you say it's a "method", and why do you say "of"? Usually, xpath expressions are *not* part of the document they ope

Re: write a 20GB file

2010-05-15 Thread Patrick Maupin
On May 15, 7:09 pm, Dave Angel wrote: > Nathan Rice wrote: > > This is precisely the situation mmap was made for :)  It has almost the same > > methods as a file so it should be an easy replacement. > > > > > Only on a 64bit system, and I'm not sure it's even possible there in > every case.  On a

Re: write a 20GB file

2010-05-15 Thread Patrick Maupin
On May 15, 7:09 pm, Dave Angel wrote: > Nathan Rice wrote: > > This is precisely the situation mmap was made for :)  It has almost the same > > methods as a file so it should be an easy replacement. > > > > > Only on a 64bit system, and I'm not sure it's even possible there in > every case.  On a

Re: write a 20GB file

2010-05-15 Thread Dave Angel
Nathan Rice wrote: This is precisely the situation mmap was made for :) It has almost the same methods as a file so it should be an easy replacement. Only on a 64bit system, and I'm not sure it's even possible there in every case. On a 32bit system, it would be impossible to mmap a 20gb f

Re: parsing XML

2010-05-15 Thread Pietro Campesato
On May 14, 7:57 am, "kak...@gmail.com" wrote: > Hi to all, let's say we have the following Xml > >   >     17.1 >     6.4 >   >   >     15.5 >     7.8 >   > > > How can i get the players name, age and height? > DOM or SAX and how > > Thanks > Antonis I've found some code which converts an X

Access to comp.lang.python

2010-05-15 Thread cjw
This isn't about Python but I'm seeking suggestions as to the best way to access the newsgroup. It seems that messages are coming from a number of sources, such as gmane and google groups. The problem is that many messages seem to get unlinked from their threads. I use Thunderbird 3.0.5 and

Re: Is Python a functional programming language?

2010-05-15 Thread Terry Reedy
On 5/15/2010 12:42 PM, travis+ml-pyt...@subspacefield.org wrote: One very annoying thing in Python is the distinction between statements and expressions. GvR regards it as a feature, claiming that research in the 1980s showed that the syntactic heterogeneity aided comprehension. I believe thi

Re: Picking a license

2010-05-15 Thread Paul Boddie
On 15 Mai, 03:46, Patrick Maupin wrote: > On May 14, 6:52 pm, Paul Boddie wrote: > > And suggesting that people have behavioural disorders ("Or because > > have OCD?") might be a source of amusement to you, or may be a neat > > debating trick in certain circles you admire, but rest assured that I

Re: Puzzled by code pages

2010-05-15 Thread Martin v. Loewis
> Conclusions: > > It's worth closely scrutinising "accented characters - equivalent to > ISO-8859-2 > (I believe)". Which variety of "OpenStep plist files" are you looking at: > NeXTSTEP, GNUstep, or MAC OS X? If the latter, it's evidently an XML document, > and you should be letting the XML pa

Re: Reading XML namespaces

2010-05-15 Thread Adam Tauno Williams
On Sat, 2010-05-15 at 23:25 +0200, Stefan Behnel wrote: > Ah, you didn't provide that information in your initial post. So you > control neither the document nor the XPath expression, right? Correct. > Can't you get the namespace-prefix mapping from your user? Nope. Or they are not going to b

Re: Reading XML namespaces

2010-05-15 Thread Martin v. Loewis
> BTW, I'm still not sure I understand your problem. Could you provide > some more details? > Wouldn't it be easier if you told the OP how to access the prefix mappings in lxml etree, or, if this was actually not possible, admitted that it is actually not possible? FWIW, in the DOM, you look at a

Re: Reading XML namespaces

2010-05-15 Thread Stefan Behnel
Adam Tauno Williams, 15.05.2010 23:04: On Sat, 2010-05-15 at 22:58 +0200, Stefan Behnel wrote: Adam Tauno Williams, 15.05.2010 22:40: On Sat, 2010-05-15 at 22:29 +0200, Stefan Behnel wrote: Adam Tauno Williams, 15.05.2010 20:37: Say I have an XML document that begins with: http://www.dsml.or

Re: Human word reader

2010-05-15 Thread David Zaslavsky
Here's my take on that: loc = re.search('for\s+(\w+)', string).group(1) Not much different, really, but it does allow for multiple spaces (\s+) as well as requiring at least one character in the word (\w+), and I use a matching group to extract the location directly instead of splitting the s

Re: Puzzled by code pages

2010-05-15 Thread John Machin
Adam Tauno Williams whitemice.org> writes: > On Fri, 2010-05-14 at 20:27 -0400, Adam Tauno Williams wrote: > > I'm trying to process OpenStep plist files in Python. I have a parser > > which works, but only for strict ASCII. However plist files may contain > > accented characters - equivalent t

Re: Reading XML namespaces

2010-05-15 Thread Adam Tauno Williams
On Sat, 2010-05-15 at 22:58 +0200, Stefan Behnel wrote: > Adam Tauno Williams, 15.05.2010 22:40: > > On Sat, 2010-05-15 at 22:29 +0200, Stefan Behnel wrote: > >> Adam Tauno Williams, 15.05.2010 20:37: > >>> Say I have an XML document that begins with: > >>> > >>> http://www.dsml.org/DSML";> > >>>

Re: Picking a license

2010-05-15 Thread Patrick Maupin
On May 15, 2:59 pm, Paul Boddie wrote: [Rest of the post, that contains points previously debated and well- refuted, snipped] > Any claim that a licensing change is needed merely to let people > develop open source applications on the platform is dishonest, See, there you go again, impugning th

Re: Reading XML namespaces

2010-05-15 Thread Stefan Behnel
Adam Tauno Williams, 15.05.2010 22:40: On Sat, 2010-05-15 at 22:29 +0200, Stefan Behnel wrote: Adam Tauno Williams, 15.05.2010 20:37: Say I have an XML document that begins with: http://www.dsml.org/DSML";> How can one access the namespaces define in this node? I've done a fair amount of XML

Re: Reading XML namespaces

2010-05-15 Thread Adam Tauno Williams
On Sat, 2010-05-15 at 22:29 +0200, Stefan Behnel wrote: > Adam Tauno Williams, 15.05.2010 20:37: > > Say I have an XML document that begins with: > > > > http://www.dsml.org/DSML";> > > How can one access the namespaces define in this node? I've done a fair > > amount of XML in Python, but haven'

pass xxx site 2 ;0

2010-05-15 Thread Mr.Ss
pass xxx site http://www.2shared.com/file/MqzpLfxz/pass_xxx_site.html -- http://mail.python.org/mailman/listinfo/python-list

pass xxx site ;0

2010-05-15 Thread Mr.Ss
pass xxx site http://www.2shared.com/uploadComplete.jsp?sId=ISfomojyvBaVf129 -- http://mail.python.org/mailman/listinfo/python-list

Re: Reading XML namespaces

2010-05-15 Thread Stefan Behnel
Adam Tauno Williams, 15.05.2010 20:37: Say I have an XML document that begins with: http://www.dsml.org/DSML";> ... How can one access the namespaces define in this node? I've done a fair amount of XML in Python, but haven't been able to uncover the call to enumerate the namespaces. Primaril

Re: Picking a license

2010-05-15 Thread John Bokma
Paul Boddie writes: > especially as the "about" page for PySide spells out the licensing > objective. Take away the proprietary software requirement and you > might as well use the GPL. Thank you for mentioning PySide, I wasn't aware of this project. -- John Bokma

Re: Picking a license

2010-05-15 Thread Paul Boddie
On 15 Mai, 04:20, Lawrence D'Oliveiro wrote: > In message > , Paul > Boddie wrote: > > Although people can argue that usage of the GPL prevents people from > > potentially contributing because they would not be able to sell > > proprietary versions of the software ... > > It doesn’t prevent them

Re: Puzzled by code pages

2010-05-15 Thread Mark Tolonen
"Adam Tauno Williams" wrote in message news:1273932760.3929.18.ca...@linux-yu4c.site... On Sat, 2010-05-15 at 20:30 +1000, Lie Ryan wrote: On 05/15/10 10:27, Adam Tauno Williams wrote: [snip] Yep. But in the interpreter both unicode() and repr() produce the same output. Nothing displays

Re: Picking a license

2010-05-15 Thread Patrick Maupin
On May 15, 12:49 pm, Albert van der Horst wrote: > In article > <7bdce8a7-bf7d-4f1f-bc9d-1eca26974...@d27g2000yqc.googlegroups.com>, > Patrick Maupin   wrote: > > > >That is correct.  All "privileges" as you put it are merely things > >that a user can do with the code without fear of a lawsuit b

Reading XML namespaces

2010-05-15 Thread Adam Tauno Williams
Say I have an XML document that begins with: http://www.dsml.org/DSML";> ... How can one access the namespaces define in this node? I've done a fair amount of XML in Python, but haven't been able to uncover the call to enumerate the namespaces. Primarily I am using etree from lxml. -- Adam Ta

Re: Picking a license

2010-05-15 Thread Patrick Maupin
On May 14, 8:04 am, Ethan Furman wrote: > Steven D'Aprano wrote: >> You've never had to recode something because it was nominally available >> under a proprietary licence that you (or your client) was unwilling to >> use? Lucky you! > Steven, did you actually read what he wrote?  If you did, why

Re: Local variables persist across function calls

2010-05-15 Thread Chris Rebert
On Sat, May 15, 2010 at 10:18 AM, Dave wrote: > I've been writing Python for a few years now, and tonight I ran into > something that I didn't understand. I'm hoping someone can explain > this to me. I'm writing a recursive function for generating > dictionaries with keys that consist of all permu

Re: Local variables persist across function calls

2010-05-15 Thread Alf P. Steinbach
On 15.05.2010 19:18, * Dave: I've been writing Python for a few years now, and tonight I ran into something that I didn't understand. I'm hoping someone can explain this to me. I'm writing a recursive function for generating dictionaries with keys that consist of all permutations of a certain set

Re: Is Python a functional programming language?

2010-05-15 Thread Aahz
In article , wrote: > >One very annoying thing in Python is the distinction between >statements and expressions. One extremely valuable thing in Python is the distinction between statements and expressions. In fact, given the semantic similarity between Python and Lisp, I would argue that Pytho

Re: Picking a license

2010-05-15 Thread Albert van der Horst
In article <7bdce8a7-bf7d-4f1f-bc9d-1eca26974...@d27g2000yqc.googlegroups.com>, Patrick Maupin wrote: > >That is correct. All "privileges" as you put it are merely things >that a user can do with the code without fear of a lawsuit by the >author, and when an author uses a permissive license, he

Re: d-cm Controll Manager

2010-05-15 Thread Kruptein
http://launchpad.net/d-cm -- http://mail.python.org/mailman/listinfo/python-list

pickle.load() all dict

2010-05-15 Thread Yutao Deng
Hi all: I'm trying to learn to use Python wrote a applet to record every day doing. and i use the pickle pickle.dump something to file no problem i think. but pickle.load whith a problem. can not load all dict do my way that what i pickle.dump(). My code: import cPickle as pickle pickle_file

Local variables persist across function calls

2010-05-15 Thread Dave
I've been writing Python for a few years now, and tonight I ran into something that I didn't understand. I'm hoping someone can explain this to me. I'm writing a recursive function for generating dictionaries with keys that consist of all permutations of a certain set. Here's the function: def ma

Re: Picking a license

2010-05-15 Thread Robert Kern
On 2010-05-14 21:37 , Steven D'Aprano wrote: On Fri, 14 May 2010 06:42:31 -0700, Ed Keith wrote: I am not a lawyer, but as I understand the LGPL, If I give someone something that used any LGPLed code I must give them the ability to relink it with any future releases of the LGPLed code. I think

Re: Is Python a functional programming language?

2010-05-15 Thread travis+ml-python
On Mon, May 10, 2010 at 08:45:51PM +0100, Nobody wrote: > On Tue, 11 May 2010 00:24:22 +1200, Samuel Williams wrote: > > Is Python a functional programming language? > Not in any meaningful sense of the term. LOL > > I heard that lambdas were limited to a single expression, > > Yes. In a functio

Re: parsing XML

2010-05-15 Thread superpollo
superpollo ha scritto: kak...@gmail.com ha scritto: Hi to all, let's say we have the following Xml 17.1 6.4 15.5 7.8 How can i get the players name, age and height? DOM or SAX and how Thanks Antonis another minimal xml.etree.ElementTree solution: >>> print doc

Re: Puzzled by code pages

2010-05-15 Thread Lie Ryan
On 05/16/10 00:12, Adam Tauno Williams wrote: > On Sat, 2010-05-15 at 20:30 +1000, Lie Ryan wrote: >> On 05/15/10 10:27, Adam Tauno Williams wrote: >>> I'm trying to process OpenStep plist files in Python. I have a parser >>> which works, but only for strict ASCII. However plist files may contain

Re: parsing XML

2010-05-15 Thread superpollo
kak...@gmail.com ha scritto: Hi to all, let's say we have the following Xml 17.1 6.4 15.5 7.8 How can i get the players name, age and height? DOM or SAX and how Thanks Antonis another minimal xml.etree.ElementTree solution: >>> print document 17.1 6.

Re: Picking a license

2010-05-15 Thread Aahz
In article <7bfa5457-027d-4ee1-a54f-3c0baba45...@e21g2000vbl.googlegroups.com>, Patrick Maupin wrote: > >So, there are good reasons for both kinds of licenses, which I think >everybody on the pro-permissive side has been saying all along. Of >course, "force" is a more inflammatory word that "obl

Re: Picking a license

2010-05-15 Thread Aahz
In article , Stefan Behnel wrote: >a...@pythoncraft.com (Aahz) writes: >> >> Which license you use depends partly on your political philosophy. > >Did they close down debian-legal, or why is this thread growing so long? Mea culpa, mea culpa, mea maxima culpa ;-) -- Aahz (a...@pythoncraft.com)

platform-independent image copy/paste with Tkinter?

2010-05-15 Thread technocake
Hi. Is there a good way to copy from or paste to the clipboard on all systems running python using Tkinter? started a small road too it here: #!/usr/bin/python __author__="technocake" __date__ ="$15.mai.2010 15:53:39$" from Tkinter import * if __name__ == "__main__": def displayClipboard(e

Re: joining two column

2010-05-15 Thread Tim Chase
On 05/15/2010 09:20 AM, mannu jha wrote: BTW: your mailer makes an absolute mess of plain-text emails, putting multiple spaces between every single line which makes it very hard to read. Please fix it, use a real mailer, or risk getting ignored (or worse, plonked). For

Re: write a 20GB file

2010-05-15 Thread Nathan Rice
This is precisely the situation mmap was made for :) It has almost the same methods as a file so it should be an easy replacement. On Sat, May 15, 2010 at 10:05 AM, Nobody wrote: > On Fri, 14 May 2010 18:38:55 -0400, J wrote: > > >>> someone smarter than me can correct me, but file.write() will

Re: Re: joining two column

2010-05-15 Thread mannu jha
On Sat, 15 May 2010 00:14:05 +0530 wrote >On 05/14/2010 12:55 PM, James Mills wrote: >> file1: >> a1 a2 >> a3 a4 >> a5 a6 >> a7 a8 >> >> file2: >> b1 b2 >> b3 b4 >> b5 b6 >> b7 b8 >> >> and I want to join them so the output should look like this: >> >> a1 a2 b1 b2 >> a3 a4 b3 b4

Re: Puzzled by code pages

2010-05-15 Thread Adam Tauno Williams
On Sat, 2010-05-15 at 20:30 +1000, Lie Ryan wrote: > On 05/15/10 10:27, Adam Tauno Williams wrote: > > I'm trying to process OpenStep plist files in Python. I have a parser > > which works, but only for strict ASCII. However plist files may contain > > accented characters - equivalent to ISO-8859

Pyinstaller on WINE - cannot install pywin32

2010-05-15 Thread train
Pyinstaller works fine on Windows XP. I am trying to get it working on WINE. Running configure.py results in asking for pywin32, however pywin 32 will not install C:\pywin32-214>c:\python26\python setup.py Building pywin32 2.6.214.0 This is a distutils setup-script for the pywin32 extensions To b

Re: write a 20GB file

2010-05-15 Thread Nobody
On Fri, 14 May 2010 18:38:55 -0400, J wrote: >>> someone smarter than me can correct me, but file.write() will write when >>> it's buffer is filled, or close() or flush() are called. >> >> And, in all probability, seek() will either flush it immediately or cause >> the next write() to flush it bef

Re: Human word reader

2010-05-15 Thread superpollo
superpollo ha scritto: timo verbeek ha scritto: I'm planning to create a human word program A human inputs a string "Give me the weather for London please." Then I will strip the string. "weather for london" Then I get the useful information. what:"weather" where:"london" After that I use the in

Re: Picking a license

2010-05-15 Thread Duncan Booth
Ed Keith wrote: > I can not imagine anyone being stupid enough to pay me for rights to > use code I had already published under the Boost License, which grants > then the rights to do anything they want with it without paying me > anything. > -EdK > Really? The Boost License says, amongst ot

Re: Human word reader

2010-05-15 Thread superpollo
timo verbeek ha scritto: I'm planning to create a human word program A human inputs a string "Give me the weather for London please." Then I will strip the string. "weather for london" Then I get the useful information. what:"weather" where:"london" After that I use the info. I need help with ge

Re: Human word reader

2010-05-15 Thread Xavier Ho
On Sat, May 15, 2010 at 9:32 PM, timo verbeek wrote: > On May 15, 1:02 pm, timo verbeek wrote: > Place starts always with for > Okay, much better. Given that constraint, it looks like regular expression can do the job. I'm not very experienced with regex, though. \w* matches a whole word compo

Re: Do any debuggers support "edit and continue?"

2010-05-15 Thread Lawrence D'Oliveiro
In message , Joel Koltner wrote: > Just curious... in Microsoft's Visual Studio (and I would presume some > other tools), for many languages (both interpreted and compiled!) there's > an "edit and conitnue" option that, when you hit a breakpoint, allows you > to modify a line of code before it's

Re: Picking a license

2010-05-15 Thread Ethan Furman
Steven D'Aprano wrote: On Thu, 13 May 2010 19:10:09 -0700, Patrick Maupin wrote: The only time that comes into play in my programming life is *when I have to recode* something that is nominally available under the GPL, You've never had to recode something because it was nominally available un

Re: Picking a license

2010-05-15 Thread Ed Keith
--- On Thu, 5/13/10, Steven D'Aprano wrote: > From: Steven D'Aprano > Subject: Re: Picking a license > To: python-list@python.org > Date: Thursday, May 13, 2010, 7:41 PM > On Thu, 13 May 2010 06:24:04 -0700, > Ed Keith wrote: > > > --- On Thu, 5/13/10, Lawrence D'Oliveiro > > > wrote: > >> >

Re: Picking a license

2010-05-15 Thread Ethan Furman
Brendan Abel wrote: While I think most of the disagreement in this long thread results from different beliefs in what "freedom" means, I wanted to add, that most of the responses that argue that the MIT license permits the user more freedom than the GPL, suffer from the broken window fallacy. Thi

Re: Picking a license

2010-05-15 Thread Ethan Furman
Steven D'Aprano wrote: On Thu, 13 May 2010 06:24:04 -0700, Ed Keith wrote: --- On Thu, 5/13/10, Lawrence D'Oliveiro wrote: What have you got against LGPL for this purpose? -- Most of my clients would not know how to relink a program if their life depended on it. And I do not want to put the

Re: Picking a license

2010-05-15 Thread Ed Keith
--- On Fri, 5/14/10, Steven D'Aprano wrote: > From: Steven D'Aprano > Subject: Re: Picking a license > To: python-list@python.org > Date: Friday, May 14, 2010, 10:59 PM > On Fri, 14 May 2010 06:39:05 -0700, > Ed Keith wrote: > > > Yes, under the GPL every one has one set of freedoms, > under t

Re: Human word reader

2010-05-15 Thread timo verbeek
On May 15, 1:02 pm, timo verbeek wrote: Place starts always with for -- http://mail.python.org/mailman/listinfo/python-list

Re: Human word reader

2010-05-15 Thread Xavier Ho
On Sat, May 15, 2010 at 9:12 PM, Xavier Ho wrote: > You need to have a very, very good set of heruistics and deterministic > functions to do that. > > "How do I get the position of a known word in a string if the length if > unknown?" > And this is what I get for late night e-mailing. is* heur

Re: Human word reader

2010-05-15 Thread Xavier Ho
On Sat, May 15, 2010 at 9:02 PM, timo verbeek wrote: > I'm planning to create a human word program > > > I need help with getting the useful information how do I get the place > if I don't now how long the string is? > > Boy, that is a very hard problem. Are the inputs restricted to anything? E

Human word reader

2010-05-15 Thread timo verbeek
I'm planning to create a human word program A human inputs a string "Give me the weather for London please." Then I will strip the string. "weather for london" Then I get the useful information. what:"weather" where:"london" After that I use the info. I need help with getting the useful informatio

Re: help need to write a python spell checker

2010-05-15 Thread Tim Chase
2) Python-list doesn't like to do other people's homework. This could be fun... :) For this problem, all you have to do is a big "if/elif/else" statement for every possible mis-spelling. If you want to get really fancy, you could put all the mis-spellings in a set() and then test the incomi

Re: Puzzled by code pages

2010-05-15 Thread Lie Ryan
On 05/15/10 10:27, Adam Tauno Williams wrote: > I'm trying to process OpenStep plist files in Python. I have a parser > which works, but only for strict ASCII. However plist files may contain > accented characters - equivalent to ISO-8859-2 (I believe). For example > I read in the line: >

yappi 0.51 released

2010-05-15 Thread k3xji
Hi all, Yappi (Yet Another Python Profiler) 0.51 released. See the version highlights: * OPTIMIZATION:Use per-pit cpc for better accuracy in different timing_sample values. Now timing_sample is not linearly decreasing the timing accuracy for most of the applications tested. We reduced the run

Re: Broken pipe

2010-05-15 Thread Lie Ryan
On 05/15/10 11:56, Lawrence D'Oliveiro wrote: > In message <4bec2a9...@dnews.tpgi.com.au>, Lie Ryan wrote: > >> On 05/13/10 22:41, Lawrence D'Oliveiro wrote: >>> In message , Chris >>> Rebert wrote: >>> Also, please don't use semicolons in your code. It's bad style. >>> >>> Wonder why they’re

Re: help need to write a python spell checker

2010-05-15 Thread James Mills
On Fri, May 14, 2010 at 6:19 PM, harry k wrote: > Write a spell checking tool that will identify all misspelled word in a text > file using a provided dictionary. Is this an assignment ? Sure looks like it! I don't see a question anywhere. --james -- http://mail.python.org/mailman/listinfo/py

Re: help need to write a python spell checker

2010-05-15 Thread Xavier Ho
1) Welcome to Python-List! 2) Python-list doesn't like to do other people's homework. 3) What have you tried? Cheers, Xav On Fri, May 14, 2010 at 6:19 PM, harry k wrote: > Write a spell checking tool that will identify all misspelled word in a > text file using a provided dictionary. > > > Th

help need to write a python spell checker

2010-05-15 Thread harry k
Write a spell checking tool that will identify all misspelled word in a text file using a provided dictionary. The program will accept either one or two command line parameters. 1. The first command line parameter is the name of the text file that will be checked. 2. The optional seco

Re: Picking a license

2010-05-15 Thread Patrick Maupin
On May 15, 1:34 am, Steven D'Aprano wrote: > On Fri, 14 May 2010 19:17:20 -0700, Patrick Maupin wrote: > > On May 14, 9:04 pm, Lawrence D'Oliveiro > central.gen.new_zealand> wrote: > >> In message <548024fc- > >> dd56-48b9-907d-3aa6a722b...@l31g2000yqm.googlegroups.com>, Patrick > >> Maupin wrote