Skip to content

Commit

Permalink
A more elaborate wrapper
Browse files Browse the repository at this point in the history
The code in the wflow works fine, but this is for testing.
  • Loading branch information
Philip Mateescu committed Aug 28, 2011
1 parent be9566a commit 2bd2fdb
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions python_wrap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
mfoo=$(echo -ne "$*" | sed '/^/ s// /g')
py=$( cat <<PY
try:
$mfoo
except Exception as e: print('Error: %s' % e)
PY
)
echo "$py" > test.py
echo "$py" | python 2>&1

python -c "$py" 2>&1

0 comments on commit 2bd2fdb

Please sign in to comment.