0

I have the following directory structure:

project
├── LICENSE.srt
├── README.md
├── pyproject.toml
├── setup.cfg
└── src
    ├── bin
    │   └── a.out
    └── package
        ├── __init__.py
        └── module.py

I am trying to package the above python project with setuptools. I want to execute the a.out file from module.py for which I am using the subprocess module.

How can I get the path for the a.out file?

The Thonnu
  • 3,578
  • 2
  • 8
  • 30
  • Use https://stackoverflow.com/questions/50499/how-do-i-get-the-path-and-name-of-the-file-that-is-currently-executing then you can extract the directory of the module and join it with the relative path to "a.out" to an absolute path. – Michael Butscher Oct 08 '22 at 12:52
  • @MichaelButscher Thanks, but file system paths don't work once we build this into a distribution such as a wheel. – Sai Chaithanya Oct 08 '22 at 17:15

0 Answers0