stop executing

Andreas Lobinger andreas.lobinger at
Tue Oct 5 10:58:15 CEST 2004


i want to put a short script and additional data together in
an shellexecutable, like this

#!/usr/bin/env python
import sys
print sys.argv

other data following, strictly not in python syntax...

I would expect the interpreter to stop after the sys.exit, but of
course the parser tries to read on.
lobingera at scylla:
   File "", line 7
     other data
SyntaxError: invalid syntax

I have now a somehow working solution by putting the data in a
multiline string, but that raises the subquestion:
How much data can be put in a multiline string and how do i
escape the tripple-" ?

Hoping for an answer and wishing a happy day

More information about the Python-list mailing list