Js2Py
Js2Py copied to clipboard
Help translating a js-script to python (stuck at Initialised babel!)
https://github.com/gologinapp/gologin is what I am trying to convert, specifically gologin.js. I am currently running:
js = get_file_contents(input_path)
py_code = translate_js6(js)
lib_name = os.path.basename(output_path).split('.')[0]
head = '__all__ = [%s]\n\n# Don\'t look below, you will not understand this Python code :) I don\'t.\n\n' % repr(
lib_name)
tail = '\n\n# Add lib to the module scope\n%s = var.to_python()' % lib_name
out = head + py_code + tail
write_file_contents(output_path, out)
It seems to be stuck at "Initialised babel!" for 30 minutes now, any suggestions?