Re: [Tutor] Evaluate my script?

2006-10-23 Thread Adam Gomaa
I'm sorry; I somehow lost a newline in copypasting. At about line #105, a newline is needed after "#return For loop" (this has been fixed on the HTML version that was linked before.) Adam Gomaa wrote: > Hello, -tutor. I wrote this script in chemistry class, which gets the > user's input for vari

[Tutor] Evaluate my script?

2006-10-23 Thread Adam Gomaa
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, -tutor. I wrote this script in chemistry class, which gets the user's input for various parts of the PV=nRT ideal gas law, then calculates the missing variable, which you indicate by putting in an 'x'. I've tried to follow 'best practices' per

Re: [Tutor] Please comment on this code...WORD FREQUENCY COUNTER

2006-10-23 Thread Tiago Saboga
Em Segunda 23 Outubro 2006 18:03, Asrarahmed Kadri escreveu: > Folks, > > I have written a program which calculates teh frequency of each word that > appears in a file. I would like to have your feedback. Sorry, I couldn't resist. Others talked about your code, but here's what I use (no, it's not

Re: [Tutor] regarding GNUPLOT and MATPLOTLIB..

2006-10-23 Thread Jason Massey
Asrarahmed, I saw this on the matplotlib site, perhaps it pertains to your situation: The latest matplotlib-0.87.6 for windows was compiled with numpy 1.0rc2. Please do not upgrade matplotlib for windows if you are running the latest numpy 1.0rc3. Check back soon as we hope to get a binary build

Re: [Tutor] regarding GNUPLOT and MATPLOTLIB..

2006-10-23 Thread Asrarahmed Kadri
I have installed numpy but still I am not able to use matplotlib. the error is same: >> from pylab import *RuntimeError: module compiled against version 102 of C-API but this versionof numpy is 109 The import of the numpy version of the nxutils module,_nsnxutils, failed.  This is is ei

Re: [Tutor] can i pass a list to a function and get one back ?

2006-10-23 Thread John Fouhy
On 23/10/06, Kent Johnson <[EMAIL PROTECTED]> wrote: > or for that matter >return range(some_var:some_var+5) [nit-pick] That would be range(some_var, some_var+5) :-) -- John. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mail

Re: [Tutor] Please comment on this code...WORD FREQUENCY COUNTER

2006-10-23 Thread John Fouhy
On 24/10/06, Asrarahmed Kadri <[EMAIL PROTECTED]> wrote: > I have written a program which calculates teh frequency of each word that > appears in a file. I would like to have your feedback. > This program only handles .txt files. I want it to handle word documents > also. How to accomplish this ..?

Re: [Tutor] Please comment on this code...WORD FREQUENCY COUNTER

2006-10-23 Thread wesley chun
> I have written a program which calculates teh frequency of each word that > appears in a file. I would like to have your feedback. > This program only handles .txt files. I want it to handle word documents > also. How to accomplish this ..??? Asrarahmed, you have made a good start. one area o

[Tutor] Please comment on this code...WORD FREQUENCY COUNTER

2006-10-23 Thread Asrarahmed Kadri
Folks,   I have written a program which calculates teh frequency of each word that appears in a file. I would like to have your feedback. This program only handles .txt files. I want it to handle word documents also. How to accomplish this ..???   Thanks. Regards. Asrarahmed   Code is as under:  

Re: [Tutor] regarding GNUPLOT and MATPLOTLIB..

2006-10-23 Thread Asrarahmed Kadri
I have installed numpy module.. Isnt that enough for using matplotlib...?? Or I need both numeric as well as Numpy..   Please reply.   Regards, Asrar  On 10/23/06, Jason Massey <[EMAIL PROTECTED]> wrote: Very possible:For gnuplot: http://gnuplot-py.sourceforge.net/  See the instructions for using o

Re: [Tutor] Exception and sys.exit() in a cgi script

2006-10-23 Thread wesley chun
> > > 7 print 'Please enter values in the > > > fields ' > > > > > > When the excption occurs, no message is shown on the browser. > > > If I run the script with IDLE, the message is printed and then the script > > > exits. > > > > > > import cgitb; cgitb.enable() > > That spits errors to the web

Re: [Tutor] regarding GNUPLOT and MATPLOTLIB..

2006-10-23 Thread Jason Massey
Very possible:For gnuplot:http://gnuplot-py.sourceforge.net/  See the instructions for using on Windows.For Matplotlib: http://matplotlib.sourceforge.net/installing.htmlPossibly what's confusing you is that both versions have external dependencies such as Numpy and Numeric (are those the same?  I'l

[Tutor] regarding GNUPLOT and MATPLOTLIB..

2006-10-23 Thread Asrarahmed Kadri
      Is it possible to use these tools on WIndows machine     -- To HIM you shall return. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] rabbit core microcontrollers - Django

2006-10-23 Thread Danny Yoo
On Sun, 22 Oct 2006, Picio wrote: > I would wonder if anyone knows something about programming Rabbit Core > Modules, that normally were programmed diretctly with Dynamic C, with > Python. > I mean either: > - something like using python to create code in dynamic suitable for > the rabbit core >

Re: [Tutor] Has anyone tried matplotlib...??

2006-10-23 Thread David Rock
* Matt Richardson <[EMAIL PROTECTED]> [2006-10-22 16:56]: > I just used it a couple of weeks ago to produce a histogram of > randomly generated numbers. Read the documentation, it's well written > and has good examples. I met the current maintainer at the chipy (Chicago Python user group) http://

[Tutor] A new error while running matplotlib....

2006-10-23 Thread Asrarahmed Kadri
>>> from pylab import *   #When i issued the above command, teh following error message is being displayed. RuntimeError: module compiled against version 102 of C-API but this versionof numpy is 109 The import o

Re: [Tutor] Unable to install Matplotlib... help me...

2006-10-23 Thread Kent Johnson
Asrarahmed Kadri wrote: > > Folks.. > > I am trying to install Matplotlib on my windows machine. I have > ActivePython 2.4.3 Build 12 (ActiveState Software Inc.) based on > Python 2.4.3 (#69, Apr 11 2006, 15:32:42) [MSC v.1310 32 bit (Intel)] on > win32. > > When I try to install matplotlib-

[Tutor] Unable to install Matplotlib... help me...

2006-10-23 Thread Asrarahmed Kadri
Folks..   I am trying to install Matplotlib on my windows machine. I have ActivePython 2.4.3 Build 12 (ActiveState Software Inc.) based onPython 2.4.3 (#69, Apr 11 2006, 15:32:42) [MSC v.1310 32 bit (Intel)] on win32.   When I try to install matplotlib-0.87.6, it gives me an error message "Python

[Tutor] Thanks.....KentRe: ANN: Resources for Python Newbies

2006-10-23 Thread Asrarahmed Kadri
  Hi folks...   Thanks a lot, Kent for this great resource.   Remain blessed.   Regards, Asrarahmed Kadri  On 10/23/06, Kent Johnson <[EMAIL PROTECTED]> wrote: I thought this notice from the python-announce list might be of interesthere.KentSubject: ANN: Resources for Python Newbies - a 30 minute v

[Tutor] ANN: Resources for Python Newbies

2006-10-23 Thread Kent Johnson
I thought this notice from the python-announce list might be of interest here. Kent Subject: ANN: Resources for Python Newbies - a 30 minute video tour of the web (2 New ShowMeDo videos) From: Ian Ozsvald <[EMAIL PROTECTED]> Date: Sun, 22 Oct 2006 16:50:56 +0100 To: [EMAIL PROTECTED], Kyran Dal