def script_string_to_notebook(str, pth):
    """
    Convert a python script represented as string `str` to a notebook
    with filename `pth`.
    """

    nb = py2jn.py_string_to_notebook(str)
    py2jn.write_notebook(nb, pth)
Convert a python script represented as string `str` to a notebook
    with filename `pth`.