A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-list/1999-September/014750.html below:

calling python interpreter

calling python interpreter calling python interpreterMichael Hudson mwh21 at cam.ac.uk
Wed Sep 1 12:14:47 EDT 1999
On Wed, 1 Sep 1999, Adrian Eyre wrote:

> > I found a solution: chmod ugo+rx pippo.py. But ... should I do the
> > same for every script? Does exist a faster system?
> 
> #!/bin/sh
> for script in `find . -name '*.py'`; do
>  chmod 755 $script
> done

I'm waiting for a build, so I don't have anything better to do than

#!/bin/bash
for script in $(find -name '*.py'); do
    firstline=$(head -n 1 $script)
    { echo $firstline | egrep "^#!" > /dev/null; }  || continue
    executable=$(echo $firstline | cut -b3- | awk '{ print $1 }')
    [ -x $executable ] || continue
    echo chmod 755 $script
done

except go home. Rewrites in Python will be ceremoniously ignored.

bashful-ly y'rs - Michael



More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4