module versioning
This commit is contained in:
parent
fc390b3a14
commit
a3812c78dc
|
@ -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
16
it/src/version.py
Normal 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
|
Loading…
Reference in New Issue
Block a user