Im tring to make a CLI app following this tutorial: https://trstringer.com/easy-and-nice-python-cli/, my file system has the following structure:
app/
├── README.md
├── install.sh
├── app
├── __init__.py
├── __main__.py
├── text.txt
├── text1.txt
└── text2.json
#the app.egg info was created automatically
├── app.egg-info
├── entry_points
├── SOURCES
└── setup.py
when I call the app from the terminal I get this error:
FileNotFoundError: [Errno 2] No such file or directory: 'text1.txt'
, even when its clearly in the directory.
The code were I call that text file worked before I tried to convert the script to a CLI app, not sure if I have to move those text file to an especific dir or especify that I need those files somewhere.
Here setup.py :
from setuptools import setup
setup(
name = 'app',
version = '0.1.0',
packages = ['app'],
entry_points = {
'console_scripts': [
'app = app.__main__:some_function'
]
})
If you need more information about the code or have an alternative on how to turn my python script into a functional CLI app don't hesitate to let me know! I'm also using click.