権限を与えて直接実行可能にする

hoge.pyファイルの1行目に

#!/usr/bin/env python
#!/usr/bin/python

のどちらかを入れて,

chmod a+x hoge.py

等で権限を与えると

python hoge.py

./hoge.py

も同じ処理になる.


Front page   Edit Diff Attach Copy Rename Reload   New List of pages Search Recent changes   Help   RSS of recent changes
Last-modified: 2017-11-08 (Wed) 19:59:12 (2367d)