Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 984 Bytes

README.md

File metadata and controls

30 lines (21 loc) · 984 Bytes

py_cmd_exec

Execute external command

Usage

>>> from py_cmd_exec import CMDExec
>>> exec = CMDExec(['date', '+%F'])
>>> exec.execute()
INFO:py_cmd_exec:executing ['date', '+%F']
DEBUG:py_cmd_exec:attempting blocking execution of ['date', '+%F']
(0, ['date', '+%F'], '2017-06-27\n', '')
>>>

Security

See Security Considerations of subprocess module.

Contributing

You are more then welcome to fork it and contribute by creating pull requests. In case of any other need, please let me know.

Please make sure your code is compliant with PEP8 standard, with some tweaks allowed:

  • E402 - in tests, module-level imports not being placed at the top of the source file are fine.
  • E501 - maximum line length is set to 92 characters (more practical and still tidy / readable)
  • E265 - it is OK to comment code without adding space after #