Conversation

mgwilliams

Instead of an event.json file, this allows any executable to be passed to python-lambda-local as the event path, which will be executed and its stdout used as the event.

@yxd-hde

subprocess module is not compatible with python27. Is it possible to use a compatible way for both python2 and python3?

@clbarnes

IMO the better way to do this would be to just support stdin if the event argument isn't given. Then you can use your regular shell utilities to pipe the event into the python-lambda-local call.

Fortunately, in the time since this PR was opened, python 2.7 was deprecated (so nobody should be using it anyway). Anyway, python 2.7 does support subprocess, you just have to use call instead of run.

Sign up for free to join this conversation on . Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.