1
0

module versioning

This commit is contained in:
Deven Blake 2021-05-31 14:57:30 -04:00
parent fc390b3a14
commit a3812c78dc
2 changed files with 20 additions and 0 deletions

View File

@ -3,6 +3,10 @@ import sys
from buffer import Buffer
from parse_command import parse_command
def version():
print("it.py line editor; ALPHA 2021")
return None
def get_command():
try:
return parse_command(input())

16
it/src/version.py Normal file
View File

@ -0,0 +1,16 @@
def version():
print("it.py version querying; ALPHA 2021")
return None
def main(buffer, command):
if len(command) > 1:
fetching = command[1:]
else:
fetching = ["it"]
for module in fetching:
if module in list(buffer.modules) or buffer.import_module_(module):
try:
buffer.modules[module].version()
except AttributeError as err:
print(err)
return buffer