[Tutor] Notepad++ question
marc.tompkins at gmail.com
Thu Jun 7 09:52:57 CEST 2012
On Thu, Jun 7, 2012 at 12:41 AM, Alan Gauld <alan.gauld at btinternet.com>wrote:
> This is almost certainly down to mixing tabs and spaces.
> You can mix them in a file but not within a block. (And
> even then I would recommend sticking to just one style)
> Some editors make it worse by autoindenting with a mixture
> of tabs and spaces which is fine for C or Java but no
> good for Python... I don't know Notepad++ so can't comment
> on it.
In Notepad++, select Settings/Preferences.
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.)
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.
Click "Close", and off you go!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor