Exemplo n.º 1
0
def _save_script(script_text, filename):
    # pylint: disable=no-member
    file_path = py.path.local(greasemonkey._scripts_dirs()[0]) / filename
    # pylint: enable=no-member
    file_path.write_text(script_text, encoding='utf-8', ensure=True)
Exemplo n.º 2
0
def _scripts_dir() -> pathlib.Path:
    p = pathlib.Path(greasemonkey._scripts_dirs()[0])
    p.mkdir(exist_ok=True)
    return p