Re: [Tutor] help related to unicode using python

2013-03-20 Thread शंतनू
Reply inline. On 21/03/13 12:18 AM, Steven D'Aprano wrote: > On 20/03/13 22:38, nishitha reddy wrote: >> Hi all >> i'm working with unicode using python >> i have some txt files in telugu i want to split all the lines of that >> text files in to words of telugu >> and i need to classify all of the

Re: [Tutor] Scripting Calligra sheets with Python

2013-03-20 Thread Jim Byrnes
On 03/19/2013 09:16 PM, Jim Byrnes wrote: On 03/18/2013 11:25 PM, Dave Angel wrote: On 03/18/2013 09:56 PM, Jim Byrnes wrote: On 03/18/2013 07:54 PM, Dave Angel wrote: On 03/18/2013 12:18 PM, Jim Byrnes wrote: I am trying to script Calligra Sheets (formerly KSpread) with python. I have gotte

Re: [Tutor] Help

2013-03-20 Thread Alan Gauld
On 20/03/13 19:57, travis jeanfrancois wrote: I create a function that allows the user to a create sentence by inputing a string and to end the sentence with a period meaning inputing "." .The problem is while keeps overwriting the previuos input 'While' does not do any such thing. Your cod

Re: [Tutor] Help

2013-03-20 Thread Robert Sjoblom
On Mar 20, 2013 10:49 p.m., "xDog Walker" wrote: > > On Wednesday 2013 March 20 13:39, Robert Sjoblom wrote: > > A word of advice: next is a keyword in python > > ~/Packages/Python/Notable-0.1.5b> python > Python 2.5 (r25:51908, May 25 2007, 16:14:04) > [GCC 4.1.2 20061115 (prerelease) (SUSE Linux

Re: [Tutor] Help

2013-03-20 Thread xDog Walker
On Wednesday 2013 March 20 13:39, Robert Sjoblom wrote: > A word of advice: next is a keyword in python ~/Packages/Python/Notable-0.1.5b> python Python 2.5 (r25:51908, May 25 2007, 16:14:04) [GCC 4.1.2 20061115 (prerelease) (SUSE Linux)] on linux2 Type "help", "copyright", "credits" or "license" f

Re: [Tutor] Help

2013-03-20 Thread Dave Angel
On 03/20/2013 03:57 PM, travis jeanfrancois wrote: Hello, I am a beginning python student and I am having trouble with a program I am writing . The problem requires me to use "while" and that I create a function that allows the user to a create sentence by inputing a string and to end the sent

Re: [Tutor] Help

2013-03-20 Thread Robert Sjoblom
> Hello, I am a beginning python student and I am having trouble with a > program I am writing. Hello, and welcome. Since you don't say if this is an assignment or not, I will just point you in the right direction, and point out a few things you might make use of. > def B1(): > period = "." You

Re: [Tutor] help related to unicode using python

2013-03-20 Thread Steven D'Aprano
On 20/03/13 22:38, nishitha reddy wrote: Hi all i'm working with unicode using python i have some txt files in telugu i want to split all the lines of that text files in to words of telugu and i need to classify all of them using some identifiers.can any one send solution for that Probably no

Re: [Tutor] Dictionary get method

2013-03-20 Thread Mitya Sirenef
On 03/20/2013 04:21 AM, Peter Otten wrote: Phil wrote: On 20/03/13 15:09, Mitya Sirenef wrote: By the way, you can further simplify it by doing: def histogram2(s): return {c: d.get(c,0)+1 for c in s} That will work in python 3, in python 2 you need: return dict((c: d.get(c,0)

Re: [Tutor] help related to unicode using python

2013-03-20 Thread Mark Lawrence
On 20/03/2013 11:38, nishitha reddy wrote: Hi all i'm working with unicode using python i have some txt files in telugu i want to split all the lines of that text files in to words of telugu and i need to classify all of them using some identifiers.can any one send solution for that

[Tutor] help related to unicode using python

2013-03-20 Thread nishitha reddy
Hi all i'm working with unicode using python i have some txt files in telugu i want to split all the lines of that text files in to words of telugu and i need to classify all of them using some identifiers.can any one send solution for that thank u _

Re: [Tutor] Dictionary get method

2013-03-20 Thread Peter Otten
Phil wrote: > On 20/03/13 15:09, Mitya Sirenef wrote: > > >> >> By the way, you can further simplify it by doing: >> >> def histogram2(s): >> return {c: d.get(c,0)+1 for c in s} >> >> >> That will work in python 3, in python 2 you need: >> >> return dict((c: d.get(c,0)+1) for c in s) >

Re: [Tutor] Dictionary get method

2013-03-20 Thread Phil
On 20/03/13 15:09, Mitya Sirenef wrote: By the way, you can further simplify it by doing: def histogram2(s): return {c: d.get(c,0)+1 for c in s} That will work in python 3, in python 2 you need: return dict((c: d.get(c,0)+1) for c in s) Thanks again Mitya, although I'm not sur

Re: [Tutor] Dictionary get method

2013-03-20 Thread Phil
On 20/03/13 14:54, Amit Saha wrote: Hello Phil, On Wed, Mar 20, 2013 at 12:54 PM, Phil wrote: Thank you for reading this. I'm working my way through a series of exercises where the author only provides a few solutions. The reader is asked to modify the histogram example so that it uses the g