1

Take for example I have the following project tree.

repo
|
+-root
  |
  +-__init__.py
  +-__main__.py
  +-packageA
    |
    +-__init__.py
    +-__main__.py

My buffer is currently at root.packageA.__main__. Due to relative imports within the code, it is necessary to run python -m root.packageA from repo. How do I do so using elpy commands?

3
  • Do you use projectile too?
    – Swedgin
    May 27, 2020 at 15:41
  • @Swedgin I do not use it directly, but it's a requirement for elpy
    – Tian
    May 28, 2020 at 4:00
  • I read your question wrong. But in projectile you can define a root project folder for each project and have seperate commands saved to compile/run/test the project by using .dir_locals.el. I don't know if that make things easier for you.
    – Swedgin
    May 29, 2020 at 9:36

0

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.