New component: Python Script (#7950)

* Add initial version

* Fix requirements

* Prefer logging over printing

* Set executor thread name on >Py36 only

* Add tests

* Lint

* Add restrictedpython to test dependencies

* Create python_script.py

From doc:
```
However, an empty dict ({}) is treated as is. If you want to specify a list that can contain anything, specify it as dict:
>>> schema = Schema({}, extra=ALLOW_EXTRA)  # don't do this
>>> try:
...   schema({'extra': 1})
...   raise AssertionError('MultipleInvalid not raised')
... except MultipleInvalid as e:
...   exc = e
>>> str(exc) == "not a valid value"
True
>>> schema({})
{}
>>> schema = Schema(dict)  # do this instead
>>> schema({})
{}
>>> schema({'extra': 1})
{'extra': 1}

```
This commit is contained in:
Paulus Schoutsen authored and Pascal Vizeli committed 2017-06-09 12:38:40 +02:00
1 parent 640c692e1f
commit db0efc647d
6 files changed
+223 -1

No files matched your search

+1
View File
@@ -65,6 +65,7 @@ TEST_REQUIREMENTS = (
'gTTS-token',
'pywebpush',
'PyJWT',
'restrictedpython',
)
IGNORE_PACKAGES = (