00001 #! /usr/bin/env python -m 00002 # -*- coding: utf-8 -*- 00003 # _____ 00004 # / _ \ 00005 # / _/ \ \ 00006 # / / \_/ \ 00007 # / \_/ _ \ ___ _ ___ ___ ____ ____ ___ _____ _ _ 00008 # \ / \_/ \ / / _\| | | __| / _ \ | ┌┐ \ | ┌┐ \ / _ \ |_ _|| | | | 00009 # \ \_/ \_/ / | | | | | └─┐| |_| || └┘ / | └┘_/| |_| | | | | └─┘ | 00010 # \ \_/ / | |_ | |_ | ┌─┘| _ || |\ \ | | | _ | | | | ┌─┐ | 00011 # \_____/ \___/|___||___||_| |_||_| \_\|_| |_| |_| |_| |_| |_| 00012 # ROBOTICS™ 00013 # 00014 # File: clearpath/__init__.py 00015 # Desc: Namespace encapsulation for Clearpath Robotics Python Modules. 00016 # Auth: Malcolm Robert 00017 # 00018 # Copyright © 2010 Clearpath Robotics, Inc. 00019 # All Rights Reserved 00020 # 00021 # Redistribution and use in source and binary forms, with or without 00022 # modification, are permitted provided that the following conditions are met: 00023 # * Redistributions of source code must retain the above copyright 00024 # notice, this list of conditions and the following disclaimer. 00025 # * Redistributions in binary form must reproduce the above copyright 00026 # notice, this list of conditions and the following disclaimer in the 00027 # documentation and/or other materials provided with the distribution. 00028 # * Neither the name of Clearpath Robotics, Inc. nor the 00029 # names of its contributors may be used to endorse or promote products 00030 # derived from this software without specific prior written permission. 00031 # 00032 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00033 # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00034 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00035 # ARE DISCLAIMED. IN NO EVENT SHALL CLEARPATH ROBOTICS, INC. BE LIABLE FOR ANY 00036 # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 00037 # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 00038 # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 00039 # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00040 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00041 # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00042 # 00043 # Please send comments, questions, or patches to code@clearpathrobotics.com 00044 # 00045 00046 00047 00048 00049 ################################################################################ 00050 # Script - Package __init__ shouldn't be able to be run as a script. 00051 00052 00053 00054 # Check if run as a script 00055 if __name__ == "__main__": 00056 import sys 00057 00058 # Warn of Module ONLY status 00059 if (sys.version_info[0] > 2 and sys.version_info[1] > 0) or \ 00060 (sys.version_info[0] == 2 and sys.version_info[1] > 6): 00061 print ("ERROR: clearpath is a module and can NOT be run as a script!\n" 00062 "For a listing of installed Clearpath Robotics Inc. modules, run:"\ 00063 "\n python -m clearpath") 00064 else: 00065 print ("ERROR: clearpath is a module and can NOT be run as a script!\n" 00066 "For a listing of installed Clearpath Robotics Inc. modules, run:"\ 00067 "\n python -m clearpath.__main__") 00068 00069 # Exit Error 00070 sys.exit(1) 00071 00072 00073 """Namespace encapsulation for Clearpath Robotics Python Modules. """ 00074 00075 00076 00077 # Module Support 00078 ## Module Version 00079 __version__ = "1.0" 00080 """Module Version""" 00081 ## SVN Code Revision 00082 __revision__ = "$Revision: 800 $" 00083 """ SVN Code Revision"""