[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, 12 Nov 2003 10:11:28 -0500 |
User-agent: |
Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux) |
I wrote:
> #!/bin/sh
> dummy='''
> '
> exec python -O "$0" ${1+"$@"}
> '
> '''
> # Python code goes here
Actually, we don't need the dummy variable:
#!/bin/sh
''':'
exec python -O "$0" ${1+"$@"}
' '''
import sys; print sys.argv
Or for even more fun:
#!/bin/sh
''':'
exec python -O "$0" ${1+"$@"}
' '''
import sys, os; os.execvp('guile', ['guile', '-s']+sys.argv)
'''
!#
(format #t "~S\n" (program-arguments))
;'''
paul