How can I combine the find command with other commands so I don't have to navigate to the folder?

I think you're looking for:

python $(find -name myscript.py)

Add the line shopt -s globstar to the file .bashrc in your home directory. (To just try this out, type this on the command line, it will only take effect in your current shell.)

Then you can use **/ to mean “in the current directory or a subdirectory and so on recursively”, i.e. the same thing as simple find commands.

python **/myscript.py

Caveat: **/ traverses symbolic links to directories, whereas find doesn't. In bash, you can't avoid this. In zsh, **/ is available out of the box and doesn't traverse symbolic links (there's ***/ for the rare cases where you want to traverse symlinks).


Just to show that there is always more than one way to do things (even without using Perl):

find -name file_name.py -exec python {} \;

will work as well. The exec option of find executes the following command for every file that it finds. In this command, {} acts as a placeholder for the file, and \; signifies the end of the command.