When starting an R process using ESS (M-x R) you are interactively asked for a working directory.

To replicate this behaviour for python I have been opening up some random file in the directory I want to start python and then calling run-python, which is not as convenient. My question is - is there a way to replicate the R behaviour? That is, call my-run-python (or whatever) which prompts for a directory and then starts python there?

  • Why not copypaste the already existing solution? To do that, use apropos command, or similar, to find the help file for the `M-x R' command, which should point to the source code file. Check that file, it should contain all the code which needs only a little changing for you to run a python session the same way. – user3496846 Jan 12 at 10:19
  • Thanks for the comment @user3496846. I've had a look at the source on github but unfortunately it is a bit beyond me right now. – Jeff Jan 12 at 14:47

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.