0

Maybe I am wrong to think that elpy is or should be able to do that.

But can't I just run the current (means: open in current active buffer) py-file?

I read about C-c C-c. But this just open a new window with a python shell. But the file does not run automaticly.

I looked into emacs's menu bar and also there I could not find a hint how to "run".

There is a if __name__ == '__main__': in that file. And it is executable by filesystem.

2
  • The way I do this is by calling python-shell-send-buffer. You can probably bind it to something convenient.
    – wvxvw
    Sep 16 at 11:53
  • And, if you wanted to run it from Dired buffer, you could move the point to it, and press !, then type python, for example.
    – wvxvw
    Sep 16 at 11:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.