Re: [BangPypers] chaining string operations..

2011-03-25 Thread Vishal
On Fri, Mar 25, 2011 at 3:31 PM, Senthil Kumaran wrote: > On Fri, Mar 25, 2011 at 03:22:02PM +0530, Vishal wrote: > > > I have a string that can be many megabytes worth memory size, and i > > want to > > If you have got that string from a file like object, instead of > loading the entire string in

Re: [BangPypers] Python equivalent for Pelmonks.org

2011-03-25 Thread Jins Thomas
On Fri, Mar 25, 2011 at 4:40 PM, Santosh Rajan wrote: > I think the perl monks have already answered your question. > > http://www.perlmonks.org/?node_id=511582 > > Yes that's right. I had gone through that. But it didn't give any solid results. > On Fri, Mar 25, 2011 at 4:23 PM, Jins Thomas

Re: [BangPypers] Python equivalent for Pelmonks.org

2011-03-25 Thread Santosh Rajan
I think the perl monks have already answered your question. http://www.perlmonks.org/?node_id=511582 On Fri, Mar 25, 2011 at 4:23 PM, Jins Thomas wrote: > Hi all, > > Do we have some site which we can compare with perlmonks.org for Python. I > have seen perlmonks.org is very helpful with lot's

[BangPypers] Python equivalent for Pelmonks.org

2011-03-25 Thread Jins Thomas
Hi all, Do we have some site which we can compare with perlmonks.org for Python. I have seen perlmonks.org is very helpful with lot's of Q&As , some small practical tutorials, thoughts on programming etc, code snippets etc. Thanks Jins Thomas ___ BangP

Re: [BangPypers] chaining string operations..

2011-03-25 Thread Senthil Kumaran
On Fri, Mar 25, 2011 at 03:22:02PM +0530, Vishal wrote: > I have a string that can be many megabytes worth memory size, and i > want to If you have got that string from a file like object, instead of loading the entire string in memory you could iterate through the file object to load one line at

[BangPypers] chaining string operations..

2011-03-25 Thread Vishal
Hello, I have a string that can be many megabytes worth memory size, and i want to perform simple string replacements. There is a certain sequence I have to follow...so I do the following: >>> type(s) >>> s1 = s.replace(' a', 'S').replace(' \t', '\n').replace('C#', '\n') Now I would like to cha