On Thu, Apr 25, 2013 at 8:45 AM, Marc Tompkins <[email protected]> wrote: > On Thu, Apr 25, 2013 at 5:40 AM, boB Stepp <[email protected]> wrote:
> Remember that input(), in Python 2, executes what's passed to it. If your > input is boB, then Python tries to execute the statement boB - and unless > you've previously defined boB, Python doesn't know what to do with it. > Thanks, Marc. What little studying I have done to date has been strictly Python 3.x based. I try to pay attention to what is discussed in this forum and had absorbed that in 2.x I should use raw_input() for what I am doing in my program. I did not recall absorbing any discussion of how input() works in 2.x. Of course, I was only beginning to suspect that the command prompt was running my .py files in 2.7 when I sent my post late yesterday evening. What you say combined with one of the earlier answers makes it much clearer to me why using input() in 2.x can allow a user to do things that I would not want him/her to do! boB _______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
