need some guidance on Python syntax smart editor for use with speech recognition

2015-01-04 Thread Eric S. Johansson
Some of you will recognize me as someone who pops up occasionally asking questions as I grope my way to a usable speech driven programming environment. My last set of experiments with a technique called togglename and speech driven template notation hit a pretty nasty wall of usability because

Re: apostrophe not considered with tkinter's wordstart and wordend

2015-01-04 Thread Rick Johnson
On Saturday, January 3, 2015 2:28:18 PM UTC-6, ravas wrote: > Is it possible that this could be added in an upcoming > version of Python -- or is this a Tk issue? A quick look at the Tkinter.Text.get source code will answer that question for you: py> import inspect py> from Tkinter import Text p

Re: OT Vernacular and empire building [was Re: How do I remove/unlink wildcarded files]

2015-01-04 Thread Rick Johnson
On Sunday, January 4, 2015 7:19:23 AM UTC-6, Steven D'Aprano wrote: > Dear gods, I know I'm going to regret this... [...] Yes, but *NOT* for the reason you think! With all the intellectual and philosophical *GOLD* i have dropped into this thread (and others), the only response you can muster is t

Re: Help with map python 2

2015-01-04 Thread Sayth Renshaw
Thank you for those solutions so varied. Am going to have a party with them to see what works best for me. Strange is there a way too use lousy comprehension without returning just the matching odd values? Sayth On Mon, 5 Jan 2015 5:06 AM Dan Stromberg wrote: > I'm partial to: > > #!/usr/local

Re: Help with map python 2

2015-01-04 Thread Terry Reedy
On 1/4/2015 6:34 AM, flebber wrote: In repsonse to this question: Write a program that prints the first 100 members of the sequence 2, -3, 4, -5, 6, -7, 8. This is my solution it works but ugly. series = range(2,100) # answer = [(x,(y* -1)) for x, y in series[::2]] # print(answer) answer = []

Re: Python Tk Tix GUI documentation & builder overview and tips

2015-01-04 Thread Terry Reedy
On 1/4/2015 3:23 AM, Christian Gollwitzer wrote: Am 03.01.15 um 22:57 schrieb Terry Reedy: The current doc is wrong in any case. I opened http://bugs.python.org/issue23156 Tix is a compiled extension, so this tix8.4.3.dll is needed as well as a couple of .tcl file including pkgIndex.tcl, wh

Re: Socket programming

2015-01-04 Thread Jorgen Grahn
On Sat, 2015-01-03, Dan Stromberg wrote: > On Sat, Jan 3, 2015 at 3:43 AM, pramod gowda wrote: ... > data=client_socket.recv(1024) > print(data) > client_socket.close() > > > But note that if you send 10 bytes into a socket, it could be received > as two chunks of 5, or other strangeness. So you

Re: Help with map python 2

2015-01-04 Thread Dan Stromberg
I'm partial to: #!/usr/local/cpython-3.4/bin/python def gen_series(top=None): ''' Generate the numbers from 2 to top, with alternating signs. If top is None, generate forever. If top is an integer, generate from 2 to top. ''' sign = 1 if top is None: number = 2

Argparse defaults

2015-01-04 Thread Joseph L. Casale
Does a facility exist to add an argument with a default being a function that leverages the final parsed Namespace? For example: group = parser.add_argument_group(' some_group ') group.add_argument( '--some_group', nargs='*', type=str ) group.add_argument(

Re: Probem with fbconsole

2015-01-04 Thread Mark Lawrence
On 04/01/2015 17:03, Ole Andreas Gløersen wrote: I want to enter text msg and upload picture (so all friends can see and some private pictures) to my Facebook acount. I'm working with fbconsole (it's important that it is text based command line) for setting up cron job on a Raspberry Pi. My c

Probem with fbconsole

2015-01-04 Thread Ole Andreas Gløersen
I want to enter text msg and upload picture (so all friends can see and some private pictures) to my Facebook acount. I'm working with fbconsole (it's important that it is text based command line) for setting up cron job on a Raspberry Pi. My code: import fbconsole redirect_uri = "https://lo

Re: Help with map python 2

2015-01-04 Thread Peter Otten
flebber wrote: > In repsonse to this question: Write a program that prints the first 100 > members of the sequence 2, -3, 4, -5, 6, -7, 8. > > This is my solution it works but ugly. > > series = range(2,100) > # answer = [(x,(y* -1)) for x, y in series[::2]] > # print(answer) > answer = [] > for

Re: Python console rejects an object reference, having made an object with that reference as its name in previous line

2015-01-04 Thread Dave Angel
On 01/04/2015 07:49 AM, Simon Evans wrote: Dear Michael Torrie, Thanks for pointing that out to me re: it not being a syntax problem. The thing is there is a file called 'EcologicalPyramid.html'. I put it in a folder called 'Soup' as the text advised on page 28. For what its worth I also shifted

OT Vernacular and empire building [was Re: How do I remove/unlink wildcarded files]

2015-01-04 Thread Steven D'Aprano
Dear gods, I know I'm going to regret this... Mark Lawrence wrote: > On 03/01/2015 17:53, Rick Johnson wrote: >> On Saturday, January 3, 2015 4:39:25 AM UTC-6, Mark Lawrence wrote: >> >>> I used to get very confused watching the old westerns. The child when >>> talking about "more" and "paw" w

Re: Python console rejects an object reference, having made an object with that reference as its name in previous line

2015-01-04 Thread Mark Lawrence
On 04/01/2015 12:49, Simon Evans wrote: Dear Michael Torrie, Thanks for pointing that out to me re: it not being a syntax problem. The thing is there is a file called 'EcologicalPyramid.html'. I put it in a folder called 'Soup' as the text advised on page 28. For what its worth I also shifted t

Re: Python console rejects an object reference, having made an object with that reference as its name in previous line

2015-01-04 Thread Simon Evans
Dear Michael Torrie, Thanks for pointing that out to me re: it not being a syntax problem. The thing is there is a file called 'EcologicalPyramid.html'. I put it in a folder called 'Soup' as the text advised on page 28. For what its worth I also shifted the Windows Command Prompt to that folder (

Re: list comparison vs integer comparison, which is more efficient?

2015-01-04 Thread Mark Lawrence
On 04/01/2015 12:22, Christian Gollwitzer wrote: Am 04.01.15 um 13:17 schrieb austin aigbe: However, it took a shorter time (0.004s) with 24 function calls than your code (0.005s) which took just 13 function calls to execute. Why is this? These times are way too short for conclusive results

Re: list comparison vs integer comparison, which is more efficient?

2015-01-04 Thread Chris Angelico
On Sun, Jan 4, 2015 at 11:17 PM, austin aigbe wrote: > However, it took a shorter time (0.004s) with 24 function calls than your > code (0.005s) which took just 13 function calls to execute. > > Why is this? That looks to me like noise in your stats. One ULP in timing stats? Not something to bas

Re: list comparison vs integer comparison, which is more efficient?

2015-01-04 Thread Christian Gollwitzer
Am 04.01.15 um 13:17 schrieb austin aigbe: However, it took a shorter time (0.004s) with 24 function calls than your code (0.005s) which took just 13 function calls to execute. Why is this? These times are way too short for conclusive results. Typically, the OS timer operates with a millise

Re: list comparison vs integer comparison, which is more efficient?

2015-01-04 Thread austin aigbe
On Sunday, January 4, 2015 12:20:26 PM UTC+1, austin aigbe wrote: > On Sunday, January 4, 2015 8:12:10 AM UTC+1, Terry Reedy wrote: > > On 1/3/2015 6:19 PM, austin aigbe wrote: > > > > > I am currently implementing the LTE physical layer in Python (ver 2.7.7). > > > For the qpsk, 16qam and 64qam m

Re: Help with map python 2

2015-01-04 Thread Jussi Piitulainen
flebber writes: > In repsonse to this question: Write a program that prints the first > 100 members of the sequence 2, -3, 4, -5, 6, -7, 8. > > This is my solution it works but ugly. Seems respectable to me, except that you are taking fewer than 100 elements. But I'd prefer the expressions that

Re: Help with map python 2

2015-01-04 Thread Alec Taylor
^To print the first 8. To print the first 100: map(lambda i: -i if i&1==1 else i, xrange(2, 102)) On Sun, Jan 4, 2015 at 10:47 PM, Alec Taylor wrote: > map(lambda i: -i if i&1==1 else i, xrange(2, 10)) > > On Sun, Jan 4, 2015 at 10:34 PM, flebber wrote: >> In repsonse to this question: Write a p

Re: Help with map python 2

2015-01-04 Thread Alec Taylor
map(lambda i: -i if i&1==1 else i, xrange(2, 10)) On Sun, Jan 4, 2015 at 10:34 PM, flebber wrote: > In repsonse to this question: Write a program that prints the first 100 > members of the sequence 2, -3, 4, -5, 6, -7, 8. > > This is my solution it works but ugly. > > series = range(2,100) > # a

Re: Help with map python 2

2015-01-04 Thread Chris Angelico
On Sun, Jan 4, 2015 at 10:34 PM, flebber wrote: > Just getting something wrong > list(map((lambda x: x * -1 if (x%2 != 0)), series)) Okay, and what happens when you run this? Do you get an exception? If so (and I fully expect you will), copy and paste the entire exception traceback and message. T

Help with map python 2

2015-01-04 Thread flebber
In repsonse to this question: Write a program that prints the first 100 members of the sequence 2, -3, 4, -5, 6, -7, 8. This is my solution it works but ugly. series = range(2,100) # answer = [(x,(y* -1)) for x, y in series[::2]] # print(answer) answer = [] for item in series: if item % 2 !=

Re: list comparison vs integer comparison, which is more efficient?

2015-01-04 Thread austin aigbe
On Sunday, January 4, 2015 8:12:10 AM UTC+1, Terry Reedy wrote: > On 1/3/2015 6:19 PM, austin aigbe wrote: > > > I am currently implementing the LTE physical layer in Python (ver 2.7.7). > > For the qpsk, 16qam and 64qam modulation I would like to know which is more > > efficient to use, between

Forward of moderated message

2015-01-04 Thread python-ro-bounces
--- Begin Message --- *Help with finding tutors for Python, Linux, R, Perl, Octave, MATLAB and/or Cytoscape for yeast microarray analysis, next generation sequencing and constructing gene interaction networks* Hi I am a visually impaired bioinformatics graduate student using microarray data f

Re: Python Tk Tix GUI documentation & builder overview and tips

2015-01-04 Thread Christian Gollwitzer
Am 03.01.15 um 22:57 schrieb Terry Reedy: On 1/3/2015 1:30 PM, aba...@gmail.com wrote: Hi, I have had issues running Tix on python 2.7.6 and 3.4.2: More details on the issue here. http://stackoverflow.com/questions/27751923/tix-widgets-installation-issue Has anyone had similar issues with Ti