On Apr 11, 5:29 pm, "Chris Lasher" <[EMAIL PROTECTED]> wrote:
> Should a Python module not intended to be executed have shebang/
> hashbang (e.g., "#!/usr/bin/env python") or not? I'm used to having a
> shebang in every .py file but I recently heard someone argue that
> shebangs were only appropriate for Python code intended to be
> executable (i.e., run from the command line).

If you don't intend the module to be executable then adding a shebang
line and/or setting the files execute bit are both contrary to
intended use. You should therefore leave out the shebang/not set the
execute bit to emphasise your intended use.
During development however, intended use may differ from use when
deployed.

- Paddy.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to