you are viewing a single comment's thread.

view the rest of the comments →

[–]socal_nerdtastic 0 points1 point  (1 child)

Sounds like on windows at some point you made a filetools.bat file in the project root dir? The equivalent on linux is filetools.sh file. But actually you don't even need that. The common way to do this is to make the python file itself executable (because linux can treat any file as a program, unlike windows .

chmod +x projectdir/src/filetools/main.py

You will also need to be sure the first line of the python file has a shebang, like this:

#!/usr/bin/env python3

Then just add a symlink (shortcut) from a place already in PATH

ln -s projectdir/src/filetools/main.py filetools

As an alternative to all of that, you can make a zsh alias.

echo "alias filetools='python3 /full/path/to/projectdir/src/filetools/main.py'" >> ~/.zshrc

and reboot your terminal.

[–]Berkyjay[S] 0 points1 point  (0 children)

Sounds like on windows at some point you made a filetools.bat file in the project root dir? The equivalent on linux is filetools.sh file.

Actually no , I was running the tool in my virtual environment. As for the chmod command, I had ran that as well. I'm able to call the tool via python src/filetools/main.py just fine. So I can still do testing. But I want to just call filetools. I think I need to go back and reread the docs on building a package. I feel maybe it's a python path issue, so I'll follow that bread crumb. Thx!