To make a bunch of Python functions executable from anywhere in Manjaro Linux, you can follow these steps:

  1. Create a directory for your scripts: You can create a directory named bin in your home directory by running the following command in the terminal:
mkdir ~/bin
  1. Add the directory to your PATH: You need to add the bin directory to your PATH environment variable so that the shell can find your scripts. You can do this by adding the following line to your shell profile file (e.g., ~/.bashrc):
export PATH="$HOME/bin:$PATH"
  1. Make your scripts executable: You need to make your Python scripts executable so that you can run them from the command line. You can do this by adding a shebang line at the beginning of your script and making the script executable using the chmod command. For example, if your script is named myscript.py, you can add the following shebang line at the beginning of your script:
#!/usr/bin/env python

Then, you can make the script executable by running the following command in the terminal:

chmod +x ~/bin/myscript.py

After following these steps, you should be able to run your Python scripts from anywhere in the terminal by simply typing the name of the script (e.g., myscript.py) and pressing Enter. The shell will automatically find the script in the bin directory and execute it using the Python interpreter.

Source:

Citations: [1] https://unix.stackexchange.com/questions/3809/how-can-i-make-a-program-executable-from-everywhere [2] https://forum.manjaro.org/t/how-can-i-run-python-script-files-like-in-windows/84329 [3] https://stackoverflow.com/questions/6967331/how-do-i-install-a-script-to-run-anywhere-from-the-command-line [4] https://bbs.archlinux.org/viewtopic.php?id=158903 [5] https://github.com/Nuitka/Nuitka [6] https://askubuntu.com/questions/5172/running-a-desktop-file-in-the-terminal