Commit ef24766b authored by Bruno Pinto's avatar Bruno Pinto

Closes #81: default to python2 and fallback to python

parent 1d7a5617
# Use python2 if found, otherwise fallback to python.
function _python
if which python2
python2
else
python
end
end
# beautify json string
# use : pybeautifyjson '{"foo": "lorem", "bar": "ipsum"}'
function pybeautifyjson
echo $argv | python -mjson.tool
end
\ No newline at end of file
echo $argv | _python -mjson.tool
end
......@@ -5,5 +5,6 @@ function pyhttp
else
set HTTPPORT 1025
end
python -m SimpleHTTPServer $HTTPPORT;
_python -m SimpleHTTPServer $HTTPPORT;
end
......@@ -5,6 +5,7 @@ function pysmtp
else
set SMTPPORT 1025
end
echo "smtp server started on port" $SMTPPORT;
python -m smtpd -n -c DebuggingServer localhost:$SMTPPORT;
_python -m smtpd -n -c DebuggingServer localhost:$SMTPPORT;
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment