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

Text file operations (Fortran) #1351

Open
fleusium opened this issue Mar 27, 2023 · 1 comment
Open

Text file operations (Fortran) #1351

fleusium opened this issue Mar 27, 2023 · 1 comment

Comments

@fleusium
Copy link

Description

Fortran implementation of the Python "open()", "file.write()", etc. functions

Test Code

Provide code which does not currently work but which should do when this issue is fixed:

with open('output.txt', 'wt', encoding='utf-8') as f:
    f.write('line')
@EmilyBourne
Copy link
Member

Hi,
Thank you very much for your interest in Pyccel. We agree that we would like to support something like this. We already have a reasonably complete version of the print function so it would be great to add the file argument.

After discussion it seems that the steps for this are:

  • Check the current status of the old (unused) code which handles with statements
  • Create a new datatype for files
  • Implement the open function
  • Implement a close function
  • Add the file argument to the print function

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

No branches or pull requests

2 participants