[issue5492] Error on leaving IDLE with quit() or exit() under Linux

2013-05-07 Thread Rajanikanth Jammalamadaka
Changes by Rajanikanth Jammalamadaka rajanika...@gmail.com: -- nosy: +Raj ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5492 ___ ___ Python-bugs

regular expression for getting content between parentheses

2009-05-07 Thread Rajanikanth Jammalamadaka
Hi I have a text file as follows: testName = ( someParam = value1 anotherParam = (value2, value3) ) how do I write a regular expression to get all the contents of the file which are between the first and last parentheses. In this case, I want: someParam = value1 anotherParam = (value2,

Re: regular expression for getting content between parentheses

2009-05-07 Thread Rajanikanth Jammalamadaka
+0100, Rajanikanth Jammalamadaka rajanika...@gmail.com wrote: Hi I have a text file as follows: testName = (  someParam = value1  anotherParam = (value2, value3) ) how do I write a regular expression to get all the contents of the file which are between the first and last parentheses

Re: split a list based on a predicate

2008-10-09 Thread Rajanikanth Jammalamadaka
Thanks for all of your replies. Rajanikanth On Wed, Oct 8, 2008 at 11:59 PM, beginner [EMAIL PROTECTED] wrote: Hi, On Oct 8, 6:36 pm, Rajanikanth Jammalamadaka [EMAIL PROTECTED] wrote: Hi! Is there a functional way to do this? I have an array [0,1,2,3,0,1,2,2,3] and I want the first

split a list based on a predicate

2008-10-08 Thread Rajanikanth Jammalamadaka
Hi! Is there a functional way to do this? I have an array [0,1,2,3,0,1,2,2,3] and I want the first chunk of non-decreasing values from this array (eg: In this case I want [0,1,2,3]) Thanks, Rajanikanth -- http://mail.python.org/mailman/listinfo/python-list

Re: python-2.6

2008-10-06 Thread Rajanikanth Jammalamadaka
There seems to be a bug with idle on Mac OS X. http://bugs.python.org/issue4017 It has to do something with reinstalling the TCL and TK. If you want to see detailed error messages, open a terminal and type idle at the command prompt. Cheers, Raj On Thu, Oct 2, 2008 at 11:26 PM, [EMAIL

[issue4049] IDLE does not open at all

2008-10-05 Thread Rajanikanth Jammalamadaka
Rajanikanth Jammalamadaka [EMAIL PROTECTED] added the comment: Hi! Chris, I am assuming that you are using Vista. If you are..then you need to enable the Administrator user (following the instructions here: http://www.computerperformance.co.uk/vista/vista_administrator_activate. htm

Re: Python on Mac

2008-08-27 Thread Rajanikanth Jammalamadaka
Hi! Luca, All you need to do is in the final step of (configure, make and make install), use make altinstall instead of make install. That way, your original python implementation won't be affected. Thanks, Raj On Wed, Aug 27, 2008 at 7:46 AM, [EMAIL PROTECTED] wrote: Hi All. I'm really new

Re: dropwhile question

2008-08-24 Thread Rajanikanth Jammalamadaka
Thanks for the explanations. Regards, Raj On Sat, Aug 23, 2008 at 3:41 PM, Scott David Daniels [EMAIL PROTECTED] wrote: Rajanikanth Jammalamadaka wrote: list(itertools.dropwhile(lambda x: x5,range(10))) [5, 6, 7, 8, 9] Why doesn't this work? list(itertools.dropwhile(lambda x: 2x5,range

dropwhile question

2008-08-23 Thread Rajanikanth Jammalamadaka
list(itertools.dropwhile(lambda x: x5,range(10))) [5, 6, 7, 8, 9] Why doesn't this work? list(itertools.dropwhile(lambda x: 2x5,range(10))) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] Thanks, Raj -- For him who has conquered the mind, the mind is the best of friends; but for one who has failed to do so,

Detect a sequence of keystrokes in an os independent way

2008-08-20 Thread Rajanikanth Jammalamadaka
Hi! Can somebody tell me if there is an os independent way to detect a sequence of key strokes. For example, I want to start some other program once the user presses a couple of keys: ex: key a and then key b Thanks, Raj -- For him who has conquered the mind, the mind is the best of friends;

Re: Detect a sequence of keystrokes in an os independent way

2008-08-20 Thread Rajanikanth Jammalamadaka
Hi! I was able to do this in the following way: import os fKey= raw_input('') if fKey=='ab': print(os.listdir(os.getcwd())) Is there a better way to do this? Thanks, Raj On Wed, Aug 20, 2008 at 2:21 PM, Rajanikanth Jammalamadaka [EMAIL PROTECTED] wrote: Hi! Can somebody tell me

Re: Vmware api

2008-08-17 Thread Rajanikanth Jammalamadaka
Hi! Luke, You can use the vmrun command for interacting with VMware Workstation/Fusion. You can do something like import os os.system('vmrun start .vmxFile') os.system('vmrun stop .vmxFile') If you can be more specific about your needs, I may be able to help you further. Thanks, Raj On Sun,

Re: Regular Expressions Quick Question

2008-07-09 Thread Rajanikanth Jammalamadaka
hi! Try this: lis=['t','tes','test','testing'] [elem for elem in lis if re.compile(^te).search(elem)] ['tes', 'test', 'testing'] Cheers, Raj On Wed, Jul 9, 2008 at 12:13 AM, Lamonte Harris [EMAIL PROTECTED] wrote: Alright, basically I have a list of words in a file and I load each word

Re: (silly?) speed comparisons

2008-07-08 Thread Rajanikanth Jammalamadaka
Try using a list instead of a vector for the C++ version. Raj On Tue, Jul 8, 2008 at 3:06 PM, mk [EMAIL PROTECTED] wrote: Out of curiosity I decided to make some speed comparisons of the same algorithm in Python and C++. Moving slices of lists of strings around seemed like a good test case.

Re: a simple 'for' question

2008-07-08 Thread Rajanikanth Jammalamadaka
Hi! Try this for x in folders: open('my/path/way'+x+'myfile.txt','r') Cheers, Raj On Tue, Jul 8, 2008 at 5:08 PM, Ben Keshet [EMAIL PROTECTED] wrote: Hi fans, I want to use a 'for' iteration to manipulate files in a set of folders, something like: folders= ['1A28','1A6W','56Y7'] for

Re: a simple 'for' question

2008-07-08 Thread Rajanikanth Jammalamadaka
') Rajanikanth Jammalamadaka wrote: Hi! Try this for x in folders: open('my/path/way'+x+'myfile.txt','r') Cheers, Raj On Tue, Jul 8, 2008 at 5:08 PM, Ben Keshet [EMAIL PROTECTED] wrote: Hi fans, I want to use a 'for' iteration to manipulate files in a set of folders, something

Re: Returning the positions of a list that are non-zero

2008-07-08 Thread Rajanikanth Jammalamadaka
Try this: li=[0,0,1,2,1,0,0] li [0, 0, 1, 2, 1, 0, 0] [i for i in range(len(li)) if li[i] != 0] [2, 3, 4] Cheers, Raj On Tue, Jul 8, 2008 at 10:26 PM, Benjamin Goudey [EMAIL PROTECTED] wrote: I have a very large list of integers representing data needed for a histogram that I'm going to