erg/doc/scripts/mylib.py
2023-01-27 06:36:12 +09:00

22 lines
390 B
Python

import os
import re
def get_file_dirname():
return os.path.dirname(__file__)
path_join = os.path.join
def str_slice(str: str, first_index: int):
return str[first_index:]
def eliminate_none_on_match(matched: re.Match):
class _a:
def __init__(self):
self.matched = matched
self.is_none = True if matched is None else False
return _a()