On 28 November 2011 15:23, surya k <sur...@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... > > Example: > > 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@python.org > To unsubscribe or change subscription options: > http://mail.python.org/mailman/listinfo/tutor >
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. http://en.wikipedia.org/wiki/Interpreted_language 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. http://stackoverflow.com/questions/2933/an-executable-python-app -- Sarma Tangirala, Class of 2012, Department of Information Science and Technology, College of Engineering Guindy - Anna University
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor