<div class="gmail_quote">On Thu, Jun 7, 2012 at 12:41 AM, Alan Gauld <span dir="ltr">&lt;<a href="mailto:alan.gauld@btinternet.com" target="_blank">alan.gauld@btinternet.com</a>&gt;</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&#39;t know Notepad++ so can&#39;t comment<br>
on it.<br>
<br></blockquote><br></div>In Notepad++, select Settings/Preferences.  <br>There&#39;s a tab called &quot;Language Menu/Tab Settings&quot; (they&#39;ve put the two things on one tab to save space; the tab settings are on the right side.)  <br>
You&#39;ll find a setting for &quot;Tab size&quot;; the default is 4 - and also a checkbox for &quot;Replace by space&quot;, which is NOT checked by default.  If you&#39;re going to be writing Python in Notepad++, you should _definitely_ check that box.  <br>
Click &quot;Close&quot;, and off you go!<br>