OXIESEC PANEL
- Current Dir:
/
/
usr
/
lib
/
python3
/
dist-packages
/
numpy
/
f2py
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
10/28/2024 08:45:52 AM
rwxr-xr-x
📄
__init__.py
1.99 KB
09/29/2017 05:31:46 PM
rw-r--r--
📄
__main__.py
739 bytes
09/17/2017 01:29:38 PM
rw-r--r--
📁
__pycache__
-
10/28/2024 08:45:52 AM
rwxr-xr-x
📄
__version__.py
254 bytes
09/17/2017 01:29:38 PM
rw-r--r--
📄
auxfuncs.py
21.31 KB
09/29/2017 05:31:46 PM
rw-r--r--
📄
capi_maps.py
30.78 KB
09/29/2017 05:31:46 PM
rw-r--r--
📄
cb_rules.py
21.71 KB
09/17/2017 01:29:38 PM
rw-r--r--
📄
cfuncs.py
42.42 KB
09/29/2017 05:31:46 PM
rw-r--r--
📄
common_rules.py
4.91 KB
09/17/2017 01:29:38 PM
rw-r--r--
📄
crackfortran.py
125.21 KB
09/29/2017 05:31:46 PM
rw-r--r--
📄
diagnose.py
5.17 KB
09/17/2017 01:29:38 PM
rw-r--r--
📄
f2py2e.py
22.37 KB
09/17/2017 01:29:38 PM
rw-r--r--
📄
f2py_testing.py
1.49 KB
09/29/2017 05:31:46 PM
rw-r--r--
📄
f90mod_rules.py
9.62 KB
09/17/2017 01:29:38 PM
rw-r--r--
📄
func2subr.py
9.01 KB
09/17/2017 01:29:38 PM
rw-r--r--
📄
info.py
136 bytes
09/17/2017 01:29:38 PM
rw-r--r--
📄
rules.py
57.17 KB
09/29/2017 05:31:46 PM
rw-r--r--
📄
setup.py
3.81 KB
12/05/2017 02:32:02 PM
rw-r--r--
📁
src
-
10/28/2024 08:45:52 AM
rwxr-xr-x
📄
use_rules.py
3.57 KB
09/17/2017 01:29:38 PM
rw-r--r--
Editing: __init__.py
Close
#!/usr/bin/env python """Fortran to Python Interface Generator. """ from __future__ import division, absolute_import, print_function __all__ = ['run_main', 'compile', 'f2py_testing'] import sys from . import f2py2e from . import f2py_testing from . import diagnose run_main = f2py2e.run_main main = f2py2e.main def compile(source, modulename='untitled', extra_args='', verbose=True, source_fn=None, extension='.f' ): """ Build extension module from processing source with f2py. Parameters ---------- source : str Fortran source of module / subroutine to compile modulename : str, optional The name of the compiled python module extra_args : str, optional Additional parameters passed to f2py verbose : bool, optional Print f2py output to screen source_fn : str, optional Name of the file where the fortran source is written. The default is to use a temporary file with the extension provided by the `extension` parameter extension : {'.f', '.f90'}, optional Filename extension if `source_fn` is not provided. The extension tells which fortran standard is used. The default is `.f`, which implies F77 standard. .. versionadded:: 1.11.0 """ from numpy.distutils.exec_command import exec_command import tempfile if source_fn is None: f = tempfile.NamedTemporaryFile(suffix=extension) else: f = open(source_fn, 'w') try: f.write(source) f.flush() args = ' -c -m {} {} {}'.format(modulename, f.name, extra_args) c = '{} -c "import numpy.f2py as f2py2e;f2py2e.main()" {}' c = c.format(sys.executable, args) status, output = exec_command(c) if verbose: print(output) finally: f.close() return status from numpy.testing.nosetester import _numpy_tester test = _numpy_tester().test bench = _numpy_tester().bench