Evaluates an expression, or calls an expression with arguments.
python('2 + 2').then((x) => assert.equal(x, 4));
python('sorted', [6, 4, 1, 3]).then((x) => assert.deepEqual(x, [1, 3, 4, 6]));
Execute a statement that does not return a value.
python.ex('import math').then(function () {
console.log('Python library `math` imported');
});
Calls an expression, with arguments, and the last being an object of key-value arguments.
let obj = {hello: 'world', foo: 'bar'};
python.kw('dict', obj).then(function (x) {
assert.notStrictEqual(x, obj);
assert.deepEqual(x, obj);
});