Added echod and renamed echo.py to server.py

This commit is contained in:
Ziad Sawalha 2011-05-08 21:11:21 -05:00
parent 64e6e8d147
commit b864c54f77
3 changed files with 43 additions and 2 deletions

26
echo/bin/echod Executable file
View File

@ -0,0 +1,26 @@
#!/bin/sh
# Copyright (C) 2011 OpenStack LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# If ../echo/__init__.py exists, add ../ to the Python search path so
# that it will override whatever may be installed in the default Python
# search path.
script_dir=`dirname $0`
if [ -f "$script_dir/../echo/__init__.py" ]
then
PYTHONPATH="$script_dir/..:$PYTHONPATH"
export PYTHONPATH
fi
/usr/bin/env python -m echo.server $*

View File

@ -1 +1,17 @@
from echo import app_factory
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2010-2011 OpenStack, LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from server import app_factory

View File

@ -22,7 +22,6 @@ from paste.deploy import loadapp
import sys
from webob.exc import HTTPUnauthorized
# If ../echo/__init__.py exists, add ../ to Python search path, so that
# it will override what happens to be installed in /usr/(local/)lib/python...
POSSIBLE_TOPDIR = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),