2

I started using Notepad++ 5.1. with NppExec 0.4.3.2 Unicode plugin. I need it for practicing python.

What I noticed is that NppExec (or even Notepad) itself is a bit buggy. For some reason, this code:

word = raw_input("type something")
print len(word)

Always outputs the len()+1 value. For example, if I enter: "python" after the raw_input prompt, it prints: 7 instead of 6. Why is that so?

Thank you.

stgeorge
  • 483
  • 3
  • 7
  • 16
  • 2
    almost willing to bet somewhere a `'\n'` is getting added along for the ride. personally i use np++ but for executing stuff, i use the PyNPP plugin, as it can load something up in an interactive python session, and you can directly check if thats whats going on. – TehTris May 23 '13 at 17:00
  • Thank you for the reply TehTris. I just started learning programming (with not prior knowledge of it), so installing the NppExec was a hell of job. I am afraid it might be the same situation with the PyNPP too? Would you be so kind to tell where should I take a look for that "\n"? – stgeorge May 23 '13 at 17:17
  • 1
    no problem. type your code in np++ and then go to plugins-> PyNPP -> Run file in python interactive. Then a python window will pop up. it will say `"type something"` , then you will type `"python"` and hit enter. THEN if `len(word)` is `6`, you know its correct. if `len(word)` is `7`, then just type `"word"`, and it will display EXACTLY what `'word'` is. – TehTris May 23 '13 at 17:36
  • There is no PyNPP in my Plugins drop menu – stgeorge May 23 '13 at 20:57
  • you have to install it, go to plugin manager and find it – TehTris May 23 '13 at 21:00

0 Answers0