Skip to content

Commit 78fd4aa

Browse files
lib: reinvent find-python.js script
now this script using promises and es6 classes !!!API HASN'T CHANGE add documentation make better logging (colorized output) make more convenient error handling (one function that catch all errors)
1 parent 2e9df6c commit 78fd4aa

File tree

3 files changed

+643
-336
lines changed

3 files changed

+643
-336
lines changed

lib/find-python-script.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
import sys, codecs;
1+
import sys;
22

33
if (sys.stdout.encoding != "utf-8" and sys.platform == "win32"):
4-
if sys.version_info > (3, 7):
5-
sys.stdout.reconfigure(encoding='utf-8')
6-
print(sys.executable)
7-
else:
8-
sys.stdout = codecs.getwriter("utf8")(sys.stdout)
9-
print(sys.executable.decode("cp1251"))
4+
sys.stdout.reconfigure(encoding='utf-8')
5+
print(sys.executable)
106
else:
117
print(sys.executable)

lib/find-python.js

Lines changed: 0 additions & 329 deletions
This file was deleted.

0 commit comments

Comments
 (0)