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

Add an option to open() the file descriptor #621

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

avitkauskas
Copy link

This PR adds an option (overload) to the open() builtin function to allow opening the file descriptors (as in python).

Useful when you want to read from the standard input:

# app.codon
for line in open(0):
    print(line)

then:

codon run app.codon < input.txt

Copy link

cla-bot bot commented Jan 30, 2025

Thank you for your pull request. We require contributors to agree to our Contributor License Agreement (https://exaloop.io/cla.txt), and we don't have @avitkauskas on file. In order for us to review and merge your code, please email info@exaloop.io to get yourself added.

@avitkauskas
Copy link
Author

This PR would allow to close #313

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.

1 participant