emacs - Indentation error in simple python -
update: original question posted using c-ret
run lines, produces error. no such error using menu python > eval region
, evaluates script.
however, using menu every execution annoying, , can't run present line alone method. problem remains.
forgive me if i'm missing obvious, can't figure out.
this code giving me indentationerror. can't imagine what's going on.
for x in range(0, 3): print "we're on time %d" % (x)
here's related python in emacs.el
;; elpy (add-to-list 'package-archives '("elpy" . "http://jorgenschaefer.github.io/packages/")) (package-initialize) (elpy-enable)
you've mixed tabs , spaces. can lead confusing errors.
i'd suggest using tabs or spaces indentation.
using spaces easier choice. editors have option automatically converting tabs spaces. if editor has option, turn on. can paste code in notepad see.
Comments
Post a Comment