Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support executable event file #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mgwilliams
Copy link

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
Copy link
Contributor

yxd-hde commented Aug 1, 2017

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

@clbarnes
Copy link

clbarnes commented Jan 17, 2025

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 GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants