In article <[EMAIL PROTECTED]>, Alex Pavluck <[EMAIL PROTECTED]> wrote: >Hello. I get the following error with the following code. Is there >something wrong with my Python installation? > >code: >import types >something = input("Enter something and I will tell you the type: ") > >if type(something) is types.IntType: > print "you entered an integer" >elif type(something) is types.StringType: > print "you entered a string" > >error: >String: Source for exec/eval is unavailable >
There are several things wrong--'least three distinct ones, by my count. What version of Python do you believe you're using? What input do you enter at the "Enter something ..." prompt? I suspect you're going to have happier results all around when you replace "input" with "raw_input". I encourage you to read the documenta- tion for each. -- http://mail.python.org/mailman/listinfo/python-list