Created
September 18, 2020 15:13
-
-
Save debuti/2cde7f4b40751fa6cee8b45ea0a31342 to your computer and use it in GitHub Desktop.
Arguments printout
This file contains 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
#!/usr/bin/env python | |
import os | |
import sys | |
import datetime | |
fname="{}.{}.cli".format(os.path.basename(sys.argv[0]), datetime.datetime.today().strftime('%Y-%m-%d_%H-%M-%S')) | |
path=os.path.join(os.path.expanduser("~"), "Desktop", fname) | |
with open(path, "w") as f: | |
f.write(" ".join(sys.argv)) | |
print("Wrote \"{}\" with \"{}\"".format(path," ".join(sys.argv))) |
This file contains 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
# python setup.py build | |
from cx_Freeze import setup, Executable | |
base = None | |
executables = [Executable("print-args.py", base=base)] | |
packages = ["idna", "os", "sys", "datetime"] | |
options = { | |
'build_exe': { | |
'packages':packages, | |
}, | |
} | |
setup( | |
name = "<any name>", | |
options = options, | |
version = "0.0.0", | |
description = '<any description>', | |
executables = executables | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment