| 1 | #!/bin/bashscip-shell filesystem . . `/bin/bash`. |
| 2 | # ex56py.sh |
| 3 | |
| 4 | # Shell commands may precede the Python script. |
| 5 | echoscip-shell system . . echo. "This precedes the embedded Python script within \"$0.\"" |
| 6 | echoscip-shell system . . echo. "===============================================================" |
| 7 | |
| 8 | python -c 'print "This line prints from an embedded Python script.\n";' |
| 9 | # Unlike sed and perl, Python uses the "-c" option. |
| 10 | python -c 'k = raw_input( "Hit a key to exit to outer script. " )' |
| 11 | |
| 12 | echoscip-shell system . . echo. "===============================================================" |
| 13 | echoscip-shell system . . echo. "However, the script may also contain shell and system commands." |
| 14 | |
| 15 | exit 0 |