[split] Move python plugin to oh-my-fish/plugin-python

https://github.com/oh-my-fish/plugin-python
This commit is contained in:
Justin Hileman 2015-05-31 08:30:49 -07:00
parent c1cf464e7e
commit 497350c771
6 changed files with 0 additions and 46 deletions

View File

@ -1,8 +0,0 @@
# Use python2 if found, otherwise fallback to python.
function _python
if which python2
python2 $argv
else
python $argv
end
end

View File

@ -1,5 +0,0 @@
# beautify json string
# use : pybeautifyjson '{"foo": "lorem", "bar": "ipsum"}'
function pybeautifyjson
echo $argv | _python -mjson.tool
end

View File

@ -1,12 +0,0 @@
# clean current directory recursively from any .pyc and .pyo files
function pyclean
set -l path2CLEAN
if set -q $argv
set path2CLEAN .
else
set path2CLEAN $argv
end
find $path2CLEAN -name "*.py[co]" -type f -delete
end

View File

@ -1,10 +0,0 @@
# start in-place a simple http server, take a optional parameter for the port number
function pyhttp
if test -n "$argv"
set HTTPPORT $argv
else
set HTTPPORT 1025
end
_python -m SimpleHTTPServer $HTTPPORT;
end

View File

@ -1,11 +0,0 @@
# start smtp debugging server, can pass an option port parameter. Default to 1025
function pysmtp
if test -n "$argv"
set SMTPPORT $argv
else
set SMTPPORT 1025
end
echo "smtp server started on port" $SMTPPORT;
_python -m smtpd -n -c DebuggingServer localhost:$SMTPPORT;
end