To avoid type in long path name, I am trying to create a folder to put all my .py file in. And I want it to be some sort of "default" folder that every time I run .py file, the system will search this folder to look for that file.
One solution i figured, is to put my .py file in those module folders like "python\lib", and I can call python -m filename.
But I do not want to make a mess in the lib folder.
Is there any other ways to do it? Thanks!
It's not possible to do that without path. The only thing that you can is putting all of modules that you want to use in the same directory, you don't have to put them python\lib , you can put them in a folder on your desktop for example.Then run your scripts in that folder but, always be sure starting scripts with #!/usr/bin/env python.
How do I run python file without path?