Re: [Tutor] PDF to TXT

2011-01-23 Thread Hongbao Chen
rgetted wrappers specifically wrapping modems (don't know, haven't looked). And as mentioned before, you can probably also use the more abstract interface provided by the operating system (TAPI stuff). And yes, USB is quite different from the POTS (Plain Old Telephone System). Forget any ideas

Re: [Tutor] Telephone app

2011-01-23 Thread Alan Gauld
"David Hutto" wrote By flow through, I mean that the phone has one of 2 states(on the hook, off the hook), and three sub states(on the hook/off the hook in use/off the hook not in use). Umm, no. Much more than that. On the actual phone we pick up the receiver, or press the button on the c

Re: [Tutor] Telephone app

2011-01-23 Thread Alan Gauld
"Steven D'Aprano" wrote Folks, this question has nothing to do with Python and is off-topic for this list. Can you all take it off-list please? To be fair David is intending doing this with Python. However he is so far off-base with how he thinks it would work that he probably does need to g

Re: [Tutor] Telephone app

2011-01-23 Thread Steven D'Aprano
bob gailer wrote: On 1/23/2011 4:04 PM, David Hutto wrote: [...] I guess you want to take the line that comes to you from your local telco, stick something computer-wise between it and an ordinary analog phone, so the computer can receive and process the caller id from an incoming call, and a

Re: [Tutor] Telephone app

2011-01-23 Thread bob gailer
On 1/23/2011 4:04 PM, David Hutto wrote: Warning - do NOT connect a telco landline to a USB port. The line voltage when "on hook" is around 50 V and rises over 100 when ringing. That will certainly fry the port. There are expansion cards and other devices designed to connect to the landline

Re: [Tutor] Telephone app

2011-01-23 Thread Walter Prins
On 23 January 2011 21:04, David Hutto wrote: > So I have to receive the signal that the phone is ringing(then I'm > assuming it sends the caller id info in between rings in some form)/or > transmit a series of tones to them to connect. > > So I think my main question is what modules might be rele

Re: [Tutor] Telephone app

2011-01-23 Thread David Hutto
> Can you step back a bit and explain what it is you are trying to > accomplish? "flow through" and "functional flow through" are meaningless > terms in telecomms - at least so far as I am aware (after my 35 years in > telecomms engineering...) It's two fold. First is the obvious of conducting a

[Tutor] PDF to TXT

2011-01-23 Thread Robert Berman
Hi, I am trying to convert .pdf files to .txt files. The script I am using below is mostly taken from research done on Google and it appears to be the one outline most consistently favored (http://code.activestate.com/recipes/577095-convert-pdf-to-plain-text/). I am using Win 7, Python 2.7.1. My

Re: [Tutor] What is a semantic error?

2011-01-23 Thread Richard D. Moores
Thanks, Tutors, for the excellent replies. I think I've got it now. Dick ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] multi-threaded/parallel processing - local tutor

2011-01-23 Thread bruce
not looking for docs.. already have code. looking to actually talk to someone in the san fran/bay area for an in person talk/tutor session. thanks 2011/1/22 शंतनू : > You may find following useful. > > 2.6+ --- http://docs.python.org/library/multiprocessing.html > 3.x --- http://docs.python.org

Re: [Tutor] What is a semantic error?

2011-01-23 Thread Alan Gauld
"Steven D'Aprano" wrote are, more or less, analogous. In principle you could design a compiler to try guessing what you probably meant when faced with syntax errors: And in fact there are several such compilers for languages like C. The Digital Equipment VAX VMS had an IDE with such a compil

Re: [Tutor] What is a semantic error?

2011-01-23 Thread Steven D'Aprano
Richard D. Moores wrote: But could someone give me a clearcut example of a semantic error? And a definition that delineates semantic errors from syntax errors. "Semantics" relates to the *meaning* of words, sentences or programs. In common English, we might say this sentence has a few grammati

Re: [Tutor] What is a semantic error?

2011-01-23 Thread Wayne Werner
On Sun, Jan 23, 2011 at 6:09 AM, Richard D. Moores wrote: > Is a semantic error one that Python doesn't see as an error -- no > error is raised; whereas syntax errors aren't errors unless Python > sees them as "Syntax Error"s? > > Yes: http://en.wikipedia.org/wiki/Semantic_error Here is a semanti

Re: [Tutor] What is a semantic error?

2011-01-23 Thread Hugo Arts
On Sun, Jan 23, 2011 at 1:09 PM, Richard D. Moores wrote: > > Is a semantic error one that Python doesn't see as an error -- no > error is raised; whereas syntax errors aren't errors unless Python > sees them as "Syntax Error"s? > Pretty much this. A semantic error is also called a logic error. A

[Tutor] What is a semantic error?

2011-01-23 Thread Richard D. Moores
Here are 3 examples of syntax errors: >>> print('and) Traceback (most recent call last): File "", line 1, in Syntax Error: print('and): , line 112 >>> if 3 > 2 ... print(3) ... Traceback (most recent call last): File "", line 1, in Syntax Error: if 3 > 2: , line 19 >>> if 34 345: ...pr

Re: [Tutor] Help on RE

2011-01-23 Thread Albert-Jan Roskam
http://imgs.xkcd.com/comics/regular_expressions.png ;-) Cheers!! Albert-Jan ~~ All right, but apart from the sanitation, the medicine, education, wine, public order, irrigation, roads, a fresh water system, and public healt

Re: [Tutor] Help on RE

2011-01-23 Thread Japhy Bartlett
it's a bug in your regex - you want something like "-?\d+" - japhy On Sat, Jan 22, 2011 at 7:38 PM, tee chwee liong wrote: > hi, > > i have a set of data and using re to extract it into array. however i only > get positive value, how to extract the whole value including the -ve sign? > For eg: >