Your ROOT_URL in app.ini is https://git.hpc.odu.edu/ but you are visiting https://git.wahab.hpc.odu.edu/wirawan0/wpylib/commit/363999badfce6dbe9d05574a3999cba246fbe789?style=split&whitespace=ignore-all
You should set ROOT_URL correctly, otherwise the web may not work correctly.
1 changed files with
17 additions and
0 deletions
text_tools.py
@ -107,6 +107,23 @@ def str_trunc_end(S, L):
else :
else :
return S
return S
def str_lstrip ( S , substr ) :
""" Strips a prefix from S if it matches the string in `substr ' .
"""
# This is akin to ${VAR#$substr} in Bourne-shell dialect.
if len ( substr ) > 0 and S . startswith ( substr ) :
return S [ len ( substr ) : ]
else :
return S
def str_rstrip ( S , substr ) :
""" Strips a suffix from S if it matches the string in `substr ' .
"""
# This is akin to ${VAR%$substr} in Bourne-shell dialect.
if len ( substr ) > 0 and S . endswith ( substr ) :
return S [ : - len ( substr ) ]
else :
return S
def str_save_to_file ( filename , s1 , * more_str , * * opts ) :
def str_save_to_file ( filename , s1 , * more_str , * * opts ) :
""" Save one or more string (or iterables) to a file with a given file.
""" Save one or more string (or iterables) to a file with a given file.