tag:blogger.com,1999:blog-6771653874686998211.post2770982437489849373..comments2023-05-10T11:10:29.026+02:00Comments on SoftwareSwirl: Starting a Python script intelligentlyMichael Haggertyhttp://www.blogger.com/profile/00332393822754558070noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-6771653874686998211.post-20523640970256926142012-09-05T15:54:43.517+02:002012-09-05T15:54:43.517+02:00This exactly what I was looking for, thanks!This exactly what I was looking for, thanks!Marcin Kulikhttps://www.blogger.com/profile/11325342787289420321noreply@blogger.comtag:blogger.com,1999:blog-6771653874686998211.post-47907582679298829872011-06-24T10:51:05.224+02:002011-06-24T10:51:05.224+02:00Yes, the /usr/bin/env trick is well-known (e.g., t...Yes, the /usr/bin/env trick is well-known (e.g., the trick and its pitfalls are described on the wikipedia page that I referenced). It mostly solves problem 1, but doesn't help with problems 2 or 3.Michael Haggertyhttps://www.blogger.com/profile/00332393822754558070noreply@blogger.comtag:blogger.com,1999:blog-6771653874686998211.post-87456529483072675892011-06-24T10:41:42.450+02:002011-06-24T10:41:42.450+02:00Do you know about env? You can use a shebang like ...Do you know about env? You can use a shebang like this:<br /><br /> #!/usr/bin/env python<br /><br />Env will search $PATH for python and then exec the first one.<br /><br />Nice hack with the file being both a shell script and python script by the way :).Robinhttps://www.blogger.com/profile/06879404124410084000noreply@blogger.com