I start my python files (.py) with
if __name__ == '__main__': somefunc()
having done it some hundreds of time manually I decided to automate it in Emacs.
(eval-after-load 'autoinsert '(define-auto-insert '("\\.\\py\\'" . "python skeleton") '("" "#!/usr/bin/env python3" \n "# ")))
I thought that putting the above snippet in the
would be enough.
.py file is still empty.
I temporarily removed all Elpy related setups from my
having proved (I guess) that Elpy doesn't contribute to the problem.
Using Emacs 24.5.1, Python 3.5.3, Debian 4.9.130-2, Elpy 1.28.0