filipmnowak / py_cmd_exec

execute external program

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 #

About

execute external program

License:The Unlicense


Languages

Language:Python 100.0%