<div class="gmail_quote">On Thu, Jun 7, 2012 at 12:41 AM, Alan Gauld <span dir="ltr"><<a href="mailto:alan.gauld@btinternet.com" target="_blank">alan.gauld@btinternet.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
This is almost certainly down to mixing tabs and spaces.<br>
You can mix them in a file but not within a block. (And<br>
even then I would recommend sticking to just one style)<br>
Some editors make it worse by autoindenting with a mixture<br>
of tabs and spaces which is fine for C or Java but no<br>
good for Python... I don't know Notepad++ so can't comment<br>
on it.<br>
<br></blockquote><br></div>In Notepad++, select Settings/Preferences. <br>There's a tab called "Language Menu/Tab Settings" (they've put the two things on one tab to save space; the tab settings are on the right side.) <br>
You'll find a setting for "Tab size"; the default is 4 - and also a checkbox for "Replace by space", which is NOT checked by default. If you're going to be writing Python in Notepad++, you should _definitely_ check that box. <br>
Click "Close", and off you go!<br>