https://github.com/interkosmos/fortran-python3
Fortran 2003 interface bindings to Python 3
https://github.com/interkosmos/fortran-python3
fortran python python3
Last synced: 11 months ago
JSON representation
Fortran 2003 interface bindings to Python 3
- Host: GitHub
- URL: https://github.com/interkosmos/fortran-python3
- Owner: interkosmos
- License: isc
- Created: 2018-02-22T18:00:59.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2020-05-28T13:28:31.000Z (over 5 years ago)
- Last Synced: 2024-12-30T13:57:40.522Z (about 1 year ago)
- Topics: fortran, python, python3
- Language: Fortran
- Homepage:
- Size: 13.7 KB
- Stars: 3
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# fortran-python3
A collection of ISO C binding interfaces to
[embed Python 3 code](https://docs.python.org/3.6/extending/embedding.html)
in Fortran 2003. Currently, this library is just a proof of concept.
## Build
Use the provided `Makefile` to build the interfaces:
```
$ make
```
Or run your favourite Fortran compiler directly:
```
$ gfortran -c src/python3.f90
```
You may have to modify the name of the Python binary, for instance:
```
$ make all PYTHON=python3.7
```
## Examples
Please check the directory `examples` for some demos:
* **simple** just calls the Python interpreter.
* **string** calls a function inside a Python module and prints the returned string to stdout.
Compile the examples with:
```
$ make
```
## Licence
ISC