The following forum message was posted by wcheung39 at http://sourceforge.net/projects/pydev/forums/forum/293649/topic/4394769:
Hi, I am getting some weird behaviors when trying to obtain the length of the user input string in PyDev. The code looks like the following: Python 2: a = raw_input() print len(a) Python 3: a = input() print(len(a)) For example, if I enter "text" as user input, calling len() on that would return 4 in when the Python 2.7.1 interpreter is used, but 5 is returned under Python 3.1.3. However if the same code is run under command line, both would return 4. Can anyone explain this behavior? Thanks for answering ------------------------------------------------------------------------------ Free Software Download: Index, Search & Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. http://p.sf.net/sfu/splunk-dev2dev _______________________________________________ Pydev-users mailing list Pydev-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pydev-users