Init cli submodule
This commit is contained in:
parent
e8323bd981
commit
c86aaca2b6
|
@ -1 +1,3 @@
|
|||
print("hello world")
|
||||
from .cli import main
|
||||
|
||||
main()
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
import os
|
||||
import sys
|
||||
|
||||
def main():
|
||||
try:
|
||||
print("Hello, world!")
|
||||
except BrokenPipeError:
|
||||
# See https://docs.python.org/3.10/library/signal.html#note-on-sigpipe
|
||||
devnull = os.open(os.devnull, os.O_WRONLY)
|
||||
os.dup2(devnull, sys.stdout.fileno())
|
||||
sys.exit(1)
|
Loading…
Reference in New Issue