[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug] env python -O
From: |
Paul Jarc |
Subject: |
Re: [bug] env python -O |
Date: |
Wed, 05 Nov 2003 14:36:54 -0500 |
User-agent: |
Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux) |
I wrote:
> I'd say your best option would be to file a Python feature request, so
> that you could add something to your script that would have the same
> effect as the -O command-line option.
Something like this would also work:
#!/bin/sh
dummy='''
'
# shell code goes here; Python will ignore it
exec python -O "$0" ${1+"$@"}
'
'''
# Python code goes here; the shell won't reach it
import sys
print sys.argv
paul