mirror of
https://github.com/ytisf/theZoo.git
synced 2025-12-05 20:19:57 -08:00
Apparently both can break on Py3
but apparently Pip can install shit mid-script in all editions of Python. Sweet.
This commit is contained in:
@@ -4,7 +4,19 @@ import rlcompleter
|
||||
try:
|
||||
import readline
|
||||
except ImportError:
|
||||
try:
|
||||
from imports import winreadline as readline
|
||||
except ImportError:
|
||||
print("Required module not installed: readline\nAttempting to install with pip...")
|
||||
try:
|
||||
import pip
|
||||
except ImportError:
|
||||
sys.exit(1)
|
||||
if hasattr(pip, 'main'):
|
||||
pip.main(['install', 'readline'])
|
||||
else:
|
||||
pip._internal.main(['install', 'readline'])
|
||||
import readline
|
||||
|
||||
from imports import globals
|
||||
from imports import manysearches
|
||||
|
||||
Reference in New Issue
Block a user