fork download
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3.  
  4. import click
  5.  
  6.  
  7. @click.group()
  8. def cmd():
  9. pass
  10.  
  11.  
  12. @cmd.command()
  13. @click.option('--name', '-n', default='world', help='ここに説明')
  14. def english(name):
  15. print(f'Hello, {name}!')
  16.  
  17.  
  18. @cmd.command()
  19. @click.option('--name', '-n', default='sekai', help='ここに説明')
  20. def japanese(name):
  21. print(f'Konnichiwa, {name}!')
  22.  
  23.  
  24. def main():
  25. cmd()
  26.  
  27.  
  28. if __name__ == '__main__':
  29. main()
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/py_compile.py", line 117, in compile
    raise py_exc
py_compile.PyCompileError:   File "prog.py", line 15
    print(f'Hello, {name}!')
                          ^
SyntaxError: invalid syntax

stdout
Standard output is empty