Sometimes I need to run python from a makefile. This little trick helps me find the python interpreter to use in a cross platform way. Have a file called pyexe.py with the following content:
#!/usr/bin/env python from sys import executable print executable
Make sure the file is executable on *NIX world and that there is a .py file association on Microsoft land.
No comments:
Post a Comment