feluxe / cmdi Goto Github PK
View Code? Open in Web Editor NEWA command interface.
License: Apache License 2.0
A command interface.
License: Apache License 2.0
The code needs some more comments to make clear what it does in some areas.
Currently you catch this in the wrapper function:
except Exception as e:
print(e, file=err)
if not catch_err:
sys.exit(1)
result = CmdResult(
val=None,
code=1,
name=name,
status=Status.error,
color=StatusColor.red,
out=kwargs.get('_out'),
err=kwargs.get('_err'),
)
You could add subprocess.CalledProcessError
which gives you:
returncode
Exit status of the child process. If the process exited due to a signal, this will be the negative signal number.
cmd
Command that was used to spawn the child process.
output
Output of the child process if it was captured by run() or check_output(). Otherwise, None.
stdout
Alias for output, for symmetry with stderr.
stderr
Stderr output of the child process if it was captured by run(). Otherwise, None.
More: https://docs.python.org/3/library/subprocess.html#subprocess.CalledProcessError
Some functions are not typed at all.
I find the reading experience for the documentation unsmooth. It should get an update...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.