Created
June 4, 2018 12:30
-
-
Save urigoren/a99542272cda99f845ff9f3cfe74a293 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys, os, json, subprocess | |
from argparse import ArgumentParser | |
__dir__ = os.path.dirname(os.path.abspath(__file__)) | |
def shell(cmd): | |
"""Run bash command""" | |
process = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) | |
stdout, stderr = process.communicate() | |
stdout = stdout.decode("utf-8") | |
stderr = stderr.decode("utf-8") | |
return stdout, stderr | |
def main(args): | |
"""Empty main function""" | |
return 0 | |
if __name__ == "__main__": | |
argparse = ArgumentParser() | |
argparse.add_argument('--input', default='/', type=str, help='input dir') | |
sys.exit(main(argparse.parse_args())) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use this quickstart python cli with:
curl -L http://goren.ml/cli > cli.py