[Tutor] why doesn't python show error
suryak at live.com
Mon Nov 28 11:31:39 CET 2011
Thanks for that information. I understood what you are saying but in general when python doesn't give us executable files (whether its in Mac/ Linux/ Windows).. how could people develop programs ?.
At some point of time people need to provide a file that runs without the help of a python interpreter..
From: Sarma Tangirala
Sent: Monday, November 28, 2011 3:46 PM
To: surya k
Cc: Python Tutor
Subject: Re: [Tutor] why doesn't python show error
On 28 November 2011 15:23, surya k <suryak at live.com> wrote:
1. Why doesn't python show error(description given below) at the beginning when we use functions which aren't present in the standard modules...
TheString = raw_input('enter a string')lengthofStr = strlen(TheString)Look closely, I used a wrong function to find length of the string. [ strlen( ) belongs to C ].When I run the program, it didn't show any error but when entered input, it then showed up!.Why python doesn't show error at the beginning just like C does?2. Why doesn't python create executable file (.exe ) when we run the code.. If this doesn't do, how can I share my program.. does everyone need to have python to check others code and know what it does?
Tutor maillist - Tutor at python.org
To unsubscribe or change subscription options:
The thing is, python does not compile code like C does. It interprets each line. So as you say, "it runs". Errors turn up only when they are encountered.
But python does have a compile version, I believe jython does this.
There are a couple of programs that generate executable, py2exe on Win for example.
Class of 2012,
Department of Information Science and Technology,
College of Engineering Guindy - Anna University
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor