Re: [Tutor] [tutor] Finding image statistics

2008-03-09 Thread Varsha Purohit
You both were right... i type casted it to int and it works with this..Thanks for catching the error !!!. but i had a question.. i want to find area of all the cells which i obtained by using imagechops.difference so should i multiply each cell with cellsize or should i add all the cells and mu

Re: [Tutor] [tutor] Finding image statistics

2008-03-09 Thread Eike Welk
On Monday 10 March 2008 01:53, Varsha Purohit wrote: >  # read the ascii file >     hdr = read_ascii.header(inFile) >     temp= hdr[4].strip().split() # temp is a list which is > ['cellsize', '127'] >     cellsize = temp[1] "cellsize" is a character string I think! You must convert it to a number

Re: [Tutor] [tutor] Finding image statistics

2008-03-09 Thread Kent Johnson
Varsha Purohit wrote: > Hello All, > I had posted this question in this community. I have a trouble. > Actually in my application i need to multiply the resultant value i am > getting with a cellsize. I am getting this cellsize by reading an ascii > file's header. But when i am trying to

Re: [Tutor] [tutor] Finding image statistics

2008-03-09 Thread Varsha Purohit
Hello All, I had posted this question in this community. I have a trouble. Actually in my application i need to multiply the resultant value i am getting with a cellsize. I am getting this cellsize by reading an ascii file's header. But when i am trying to multiply it with the result of ima

Re: [Tutor] Word List

2008-03-09 Thread Marc Tompkins
On Sun, Mar 9, 2008 at 4:02 PM, Alan Gauld <[EMAIL PROTECTED]> wrote: > > "Marc Tompkins" <[EMAIL PROTECTED]> wrote > >... I have now realized the bad things about > >> self-learning. > > > > There are bad things? Nobody told me... > > I appreciate the humor but seriously, yes there are bad thing

Re: [Tutor] Word List

2008-03-09 Thread Alan Gauld
"Marc Tompkins" <[EMAIL PROTECTED]> wrote >... I have now realized the bad things about >> self-learning. > > There are bad things? Nobody told me... I appreciate the humor but seriously, yes there are bad things. There are a lot of good things too of course, but it is easy when self learnin

Re: [Tutor] Word List

2008-03-09 Thread Emad Nawfal
On Sun, Mar 9, 2008 at 6:38 PM, Marc Tompkins <[EMAIL PROTECTED]> wrote: > 2008/3/9 Emad Nawfal <[EMAIL PROTECTED]>: > > > Thank you so much Kent. It works. I have now realized the bad things > > about self-learning. > > > > There are bad things? Nobody told me... > > -- > www.fsrtechnologies.com

Re: [Tutor] Word List

2008-03-09 Thread Marc Tompkins
2008/3/9 Emad Nawfal <[EMAIL PROTECTED]>: > Thank you so much Kent. It works. I have now realized the bad things about > self-learning. > There are bad things? Nobody told me... -- www.fsrtechnologies.com ___ Tutor maillist - Tutor@python.org http:

[Tutor] Bag of Words and libbow

2008-03-09 Thread Dinesh B Vadhia
Has anyone come across Python modules/libraries to perform "Bag of Words" text analysis or an interface to the libbow C library? Thank-you! Dinesh ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Word List

2008-03-09 Thread Emad Nawfal
2008/3/9 Kent Johnson <[EMAIL PROTECTED]>: > Emad Nawfal wrote: > > Dear Tutors, > > I'm trying to get the most frequent words in an Arabic text. I wrote the > > following code and tried it on English and it works fine, but when I try > > it on Arabic, all I get is the slashes and x's. > > > impor

Re: [Tutor] Word List

2008-03-09 Thread Emad Nawfal
Dear Tutors, > I'm trying to get the most frequent words in an Arabic text. I wrote the > following code and tried it on English and it works fine, but when I try it > on Arabic, all I get is the slashes and x's. I'm not familiar with Unicode. > Could somebody please tell me what's wrong here, and

Re: [Tutor] Word List

2008-03-09 Thread Kent Johnson
Emad Nawfal wrote: > Dear Tutors, > I'm trying to get the most frequent words in an Arabic text. I wrote the > following code and tried it on English and it works fine, but when I try > it on Arabic, all I get is the slashes and x's. > import codecs > infile = codecs.open(r'C:\Documents and > S

[Tutor] Word List

2008-03-09 Thread Emad Nawfal
Dear Tutors, I'm trying to get the most frequent words in an Arabic text. I wrote the following code and tried it on English and it works fine, but when I try it on Arabic, all I get is the slashes and x's. I'm not familiar with Unicode. Could somebody please tell me what's wrong here, and how I ca

Re: [Tutor] self-learning Python

2008-03-09 Thread Lowell Tackett
Julia <[EMAIL PROTECTED]> wrote: On Sun, Mar 9, 2008 at 5:00 PM, Lowell Tackett <[EMAIL PROTECTED]> wrote: There's an essential (in my opinion) principle of learning programming...learning is not only absorbing stuff, but what I call (and I'm certain it didn't originate with me) "finger t

Re: [Tutor] self-learning Python

2008-03-09 Thread Julia
On Sun, Mar 9, 2008 at 5:00 PM, Lowell Tackett <[EMAIL PROTECTED]> wrote: > > > There's an essential (in my opinion) principle of learning programming > that doesn't seem to have made its' way into this conversation. I'll > preface my thoughts by saying that in-again, my opinion- Michael Dawson's

Re: [Tutor] self-learning Python

2008-03-09 Thread Lowell Tackett
Julia <[EMAIL PROTECTED]> wrote: Emad Nawfal wrote: > On Sun, Mar 9, 2008 at 8:16 AM, Julia <[EMAIL PROTECTED] > > wrote: > To be honest I truly dislike the Dawson book. I wouldn't recommend > it to anyone. It's lacks technical clarity, examples and has a mes

Re: [Tutor] self-learning Python

2008-03-09 Thread Alan Gauld
"Julia" <[EMAIL PROTECTED]> wrote > When I was a complete beginner I preferred Beginning Python over > Dawson and > I still do (I'm still a beginner). But that might just me be me :) Book (and tutorial) choices are very subjective. I know the styles of book I like and dislike. I hate "chatty, i

Re: [Tutor] self-learning Python

2008-03-09 Thread Julia
> > Emad Nawfal wrote: > > On Sun, Mar 9, 2008 at 8:16 AM, Julia <[EMAIL PROTECTED] > > > wrote: > > To be honest I truly dislike the Dawson book. I wouldn't recommend > > it to anyone. It's lacks technical clarity, examples and has a messy > > index. I'm going

Re: [Tutor] self-learning Python

2008-03-09 Thread bhaaluu
On Sun, Mar 9, 2008 at 8:54 AM, Kent Johnson <[EMAIL PROTECTED]> wrote: > > On Sun, Mar 9, 2008 at 8:16 AM, Julia <[EMAIL PROTECTED] wrote: > > To be honest I truly dislike the Dawson book. I wouldn't recommend > > it to anyone. It's lacks technical clarity, examples and has a messy > >

Re: [Tutor] Make sound with python? Cross platform?

2008-03-09 Thread Wesley Brooks
Thanks very much. Not quite sure why I didn't find those earlier! I'll have a look now. Cheers, Wesley. On 09/03/2008, Kent Johnson <[EMAIL PROTECTED]> wrote: > Wesley Brooks wrote: > > Dear Users, > > > > I've been digging around to try and find a way to make python make > > sound. I would

Re: [Tutor] self-learning Python

2008-03-09 Thread Luciano Ramalho
My recommendation for a book to learn to program, using Python is "How to think like a Computer Scientist: learning with Python (2nd edition)" [1]. It's a free online book, but a printed version of the first edition is also available. [1] http://openbookproject.net/thinkCSpy/index.xhtml Don't let

Re: [Tutor] Make sound with python? Cross platform?

2008-03-09 Thread Kent Johnson
Wesley Brooks wrote: > Dear Users, > > I've been digging around to try and find a way to make python make > sound. I would either like to sound out a string of musical notes > including rests or simply have something that I set the frequency and > duration then sound and repeat for the number of n

Re: [Tutor] Make sound with python? Cross platform?

2008-03-09 Thread Luciano Ramalho
On Sun, Mar 9, 2008 at 10:57 AM, Wesley Brooks <[EMAIL PROTECTED]> wrote: > I've been digging around to try and find a way to make python make > sound. I would either like to sound out a string of musical notes [...] Wesley, take a look at PyGame [1]. PyGame is a Python wrapper on top of SDL [2]

[Tutor] Make sound with python? Cross platform?

2008-03-09 Thread Wesley Brooks
Dear Users, I've been digging around to try and find a way to make python make sound. I would either like to sound out a string of musical notes including rests or simply have something that I set the frequency and duration then sound and repeat for the number of notes. If possible I would prefer

Re: [Tutor] self-learning Python

2008-03-09 Thread Kent Johnson
Emad Nawfal wrote: > On Sun, Mar 9, 2008 at 8:16 AM, Julia <[EMAIL PROTECTED] > > wrote: > To be honest I truly dislike the Dawson book. I wouldn't recommend > it to anyone. It's lacks technical clarity, examples and has a messy > index. I'm going to sell my e

Re: [Tutor] self-learning Python

2008-03-09 Thread Emad Nawfal
On Sun, Mar 9, 2008 at 8:16 AM, Julia <[EMAIL PROTECTED]> wrote: > Message: 3 > > Date: Sat, 08 Mar 2008 16:39:16 -0500 > > From: Kent Johnson <[EMAIL PROTECTED]> > > Subject: Re: [Tutor] self-learning Python > > To: "Enrique Nieves, Jr." <[EMAIL PROTECTED]> > > Cc: tutor@python.org > > Message-ID

Re: [Tutor] self-learning Python

2008-03-09 Thread Julia
> > Message: 3 > Date: Sat, 08 Mar 2008 16:39:16 -0500 > From: Kent Johnson <[EMAIL PROTECTED]> > Subject: Re: [Tutor] self-learning Python > To: "Enrique Nieves, Jr." <[EMAIL PROTECTED]> > Cc: tutor@python.org > Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/plain; charset=windows-1252; form