- Notifications
You must be signed in to change notification settings - Fork5
A versatile, template-based FORTRAN wrapper written in Python.
License
DLR-SC/F2x
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A versatile, template-based Fortran wrapper written in Python.
F2x is a Python tool that allows you to take your Fortran code and make it accessible from other languages(mainly Python). Compared to the popular toolf2py it comeswith two important differences:
- A full Fortran parser based on the work by theOpenFortranParser
- A very flexible code generation backend that usesJinja2 templates
To install the latest version of F2x, you can use the following commands:
git clone https://github.com/DLR-SC/F2x.git
cd F2x
python setup.py install --user
(Note the--user
flag to allow installation without admin rights.)F2x --help
(Confirms installation of F2x.)
Please refer to thedocumentationto find more infomation aboutgetting started.
F2x reuses a lot of stuff from other Open Source projects. Namely the following parts were really helpful:
- It is developed in Python 3 and does currently not support Python 2 out of the box.
- The PLY project is used as parser generator. PlyPlus does the heavy lifiting of converting ANTLR-like grammars to PLY.
- The Fortran grammar that comes bundled with F2x originates from the OpenFortranProject.
- Templates are based on Jinja2.
Copyright 2018 German Aerospace Center (DLR)
Licensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.