Adapt cubedeck.py for Windows

This commit is contained in:
henriquenakashima 2023-04-25 00:49:01 -04:00
parent ee01bcd909
commit 4cd41ff129

View file

@ -1,11 +1,10 @@
# Setup:
# 1. Download cube list .txt from CubeCobra's export to .txt function
# 2. (Windows, non-WSL only) Install pyreadline3
#
# Usage:
#
# Download cube list .txt from CubeCobra's export to .txt function
#
# $ python3 cubedeck.py MyCubeList.txt
#
#
#
# Enter card: Mo [tab]
# Mogg War Marshal Moment's Peace Monastery Swiftspear Mortarpod Mountain
# Moldervine Cloak Momentary Blink Monoskelion Mortify
@ -70,8 +69,8 @@ def open_file_with_default(file):
def enable_autocomplete():
if 'libedit' in readline.__doc__:
readline.parse_and_bind("bind ^I rl_complete")
if readline.__doc__ is not None and 'libedit' in readline.__doc__:
readline.parse_and_bind("bind ^I rl_complete") # macOS
else:
readline.parse_and_bind("tab: complete")