Skip to content

filipmnowak/py_cmd_exec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 #

Releases

No releases published

Packages

No packages published

Languages