hostify.py

Go to the documentation of this file.
00001 __copyright__ = """\
00002 (c). Copyright 1990-2008, Vyper Logix Corp., All Rights Reserved.
00003 
00004 Published under Creative Commons License 
00005 (http://creativecommons.org/licenses/by-nc/3.0/) 
00006 restricted to non-commercial educational use only., 
00007 
00008 See also: http://www.VyperLogix.com and http://www.pypi.info for details.
00009 
00010 THE AUTHOR VYPER LOGIX CORP DISCLAIMS ALL WARRANTIES WITH REGARD TO
00011 THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
00012 FITNESS, IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL,
00013 INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
00014 FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
00015 NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
00016 WITH THE USE OR PERFORMANCE OF THIS SOFTWARE !
00017 
00018 USE AT YOUR OWN RISK.
00019 """
00020 
00021 def hostify(endpoint):
00022     toks = endpoint.split('//')[-1].split('/')[0].split('.')
00023     toks[0] = toks[0].split('-')[0]
00024     return '.'.join(toks)
00025 
00026 if __name__ == "__main__":
00027     import sys
00028     print >>sys.stdout, __copyright__
00029     print >>sys.stderr, __copyright__
00030 
00031 

© Copyright 2008-2009 Vyper Logix Corp., All Right Reserved; If you reference this document or any part of this document you must use the citation verbatim (including the link) "© Copyright 2008-2009 Vyper Logix Corp., All Right Reserved."

Notice: This source code contained in this document is NOT open source and is NOT being distributed as open source.

122,241 lines of code and growing...