Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

import os 

import sys 

 

""" 

For users that compile FORTRAN with MinGW, python 3.8 and above need to  

add the import path of the DLL libraries. 

""" 

 

def add_mingw_lib(): 

# python >=3.8 needs to be given permission to import DLL files. 

if hasattr(os, 'add_dll_directory'): 

is_64_bit = sys.maxsize > 2**32 

 

path_str = os.environ.get('PATH') 

 

pathL = path_str.split(';') 

for path in pathL: 

slower = path.lower() 

if slower.endswith('bin'): 

if is_64_bit: 

if slower.find('mingw64') >= 0: 

#print( '-->Adding: "%s"'%path,'to os.add_dll_directory' ) 

os.add_dll_directory( path ) 

else: 

if slower.find('mingw32') >= 0: 

#print( '-->Adding: "%s"'%path,'to os.add_dll_directory' ) 

os.add_dll_directory( path )