This commit is contained in:
2025-04-05 00:47:32 +03:00
parent ae9795bd53
commit 76bcba9340
4 changed files with 38 additions and 29 deletions
+10 -16
View File
@@ -1,18 +1,12 @@
from argenta.app import App
from argenta.command import Command
from argenta.router import Router
from contextlib import redirect_stdout
import io
router = Router()
@router.command(Command('test'))
def test():
print(f'test command')
@router.command(Command('some'))
def test2():
print(f'some command')
app = App()
app.include_router(router)
app.start_polling()
while True:
with redirect_stdout(io.StringIO()) as f:
a = input('rgsert')
print(a)
res = f.getvalue()
print('-'*len(res))
print(res.replace('\n', ''))
print('-'*len(res))