problem with indentation and emacs

Cliff Wells logiplexsoftware at earthlink.net
Thu Oct 18 01:09:06 CEST 2001


On Wednesday 17 October 2001 14:26, Markus Jais wrote:

> when I cut and paste some code within a *.py file
> then there seems to be problems with identation.
>
> everything looks fine, but the programm crashes with
> syntax error or with "IndentationError: expected an indented block"
>
> when I look at the code, everything looks o.k.
> when I open the file with vim and reindent everyting,
> the programm works.

I often get this when doing the "cut and paste" thing.  If you are using tabs 
to indent, do a  M-x tabify on the region you pasted.  If you are using 
spaces, do a M-x untabify.  It comes down to either you or the author you are 
"borrowing" from are using different indent (ie tabs vs spaces) styles.

-- 
Cliff Wells
Software Engineer
Logiplex Corporation (www.logiplex.net)
(503) 978-6726 x308
(800) 735-0555 x308




More information about the Python-list mailing list