Re: [Tutor] sending a wav file to a website?

2013-02-12 Thread eryksun
On Tue, Feb 12, 2013 at 3:48 PM, richard kappler wrote: > So the question is, how do I get a wav file to a website like the one listed > above and retrieve the text result using python (or don't I)? I've looked at > and played around with urllib, I get how it works, I'm pretty comfy with it, > but

Re: [Tutor] sending a wav file to a website?

2013-02-12 Thread Alan Gauld
On 12/02/13 20:48, richard kappler wrote: So the question is, how do I get a wav file to a website like the one listed above and retrieve the text result using python Can you be a bit more explicit? You can send the file to a url using http or ftp. That will create a copy of the file on the re

Re: [Tutor] associating two objects without ORM and processing a text file

2013-02-12 Thread Steven D'Aprano
On 13/02/13 04:32, neubyr wrote: I am not following your comment on opening books file twice in list_by_author method. I have opened it only once and then reading each line while checking for a regex match. Am I missing something? You open the catalog file once to read the books in the first

Re: [Tutor] Question on regular expressions

2013-02-12 Thread Mark Lawrence
On 12/02/2013 17:43, Marcin Mleczko wrote: Hello, given this kind of string: "start SomeArbitraryAmountOfText start AnotherArbitraryAmountOfText end" a search string like: r"start.*?end" would give me the entire string from the first "start" to "end" : "start SomeArbitraryAmountOfText start An

Re: [Tutor] associating two objects without ORM and processing a text file

2013-02-12 Thread Dave Angel
On 02/12/2013 12:32 PM, neubyr wrote: On Mon, Feb 11, 2013 at 7:34 PM, Steven D'Aprano wrote: I am not following your comment on opening books file twice in list_by_author method. I have opened it only once and then reading each line while checking for a regex match. Am I missing something?

[Tutor] sending a wav file to a website?

2013-02-12 Thread richard kappler
Maybe way off scope here, I hope not. I just can't get the accuracy I need with pocketsphinx at the moment(though I continue to work on it). Google's webkit-speech actually works pretty durned well, here's an example: http://slides.html5rocks.com/#speech-input But that doesn't really solve any pro

Re: [Tutor] Question on regular expressions

2013-02-12 Thread Peter Otten
Marcin Mleczko wrote: > given this kind of string: > > "start SomeArbitraryAmountOfText start AnotherArbitraryAmountOfText end" > > a search string like: r"start.*?end" would give me the entire string > from the first "start" to "end" : "start SomeArbitraryAmountOfText start > AnotherArbitraryAm

Re: [Tutor] Question on regular expressions

2013-02-12 Thread Alan Gauld
On 12/02/13 17:43, Marcin Mleczko wrote: but I am interested only in the second part between the 2nd "start" and the "end": "start AnotherArbitraryAmountOfText end" What would be best, most clever way to search for that? best and clever are not always the same. The simplest way if its a fixe

[Tutor] Question on regular expressions

2013-02-12 Thread Marcin Mleczko
Hello, given this kind of string: "start SomeArbitraryAmountOfText start AnotherArbitraryAmountOfText end" a search string like: r"start.*?end" would give me the entire string from the first "start" to "end" : "start SomeArbitraryAmountOfText start AnotherArbitraryAmountOfText end" but I am int

Re: [Tutor] associating two objects without ORM and processing a text file

2013-02-12 Thread neubyr
On Mon, Feb 11, 2013 at 7:34 PM, Steven D'Aprano wrote: > On 12/02/13 10:16, Alan Gauld wrote: > >> On 11/02/13 22:49, neubyr wrote: >> >> is right approach to implement 'list_by_author' function as a class >>> method is typically used as an alternative constructor. >>> >> >> Not at all that is o

Re: [Tutor] associating two objects without ORM and processing a text file

2013-02-12 Thread eryksun
On Mon, Feb 11, 2013 at 8:56 PM, Alan Gauld wrote: > (One of the unfortunate features of Python's implementation of > class methods is that you can call them from an instance which > doesn't really make sense! IMHO) Smalltalk derives a metaclass for the class methods, in parallel with the class.

Re: [Tutor] sockets and networking

2013-02-12 Thread Alan Gauld
On 12/02/13 04:27, richard kappler wrote: ports to a python program on the laptop. Someone suggest using sockets, with which I am completely unfamiliar. I've read the socket docs and admit I find them quite confusing. Can someone point me to a/some good beginner tutorials on sockets/networking f