Package chianti :: Package fortranformat :: Module config
[hide private]
[frames] | no frames]

Source Code for Module chianti.fortranformat.config

 1  import sys 
 2  import os 
 3   
 4  # Should all edit descriptor values be returned even if they were not 
 5  # written to? 
 6  RET_WRITTEN_VARS_ONLY = False 
 7  # Should 'None' values be returned when no record is available to read 
 8  # from or the FORTRAN 'default'? 
 9  RET_UNWRITTEN_VARS_NONE = True 
10  # The order in which edit desciptors are tried by default when G edit 
11  # descriptor encountered on input 
12  G_INPUT_TRIAL_EDS = ['F', 'L', 'A'] 
13  # Contrary to specification, many compilers allow zero width edit 
14  # descriptors 
15  ALLOW_ZERO_WIDTH_EDS = True 
16  # Set the characters that separate the records 
17  RECORD_SEPARATOR = '\n' 
18   
19  # The maximum size for an integer 
20  if sys.version_info[0] >= 3: 
21      PROC_MAXINT = sys.maxsize 
22  else: 
23      PROC_MAXINT = sys.maxint 
24  # Processor dependant default for including leading plus or not 
25  PROC_INCL_PLUS = False  
26  # Option to allow signed binary, octal and hex on input (not a FORTRAN feature) 
27  PROC_ALLOW_NEG_BOZ = False 
28  # Prcessor dependant padding character 
29  PROC_PAD_CHAR = ' ' 
30  # Interpret blanks or jsut a negative as a zero, as in ifort behaviour 
31  PROC_NEG_AS_ZERO = True 
32  # Show a sign for zero? 
33  PROC_SIGN_ZERO = False 
34  PROC_MIN_FIELD_WIDTH = 46 
35  PROC_DECIMAL_CHAR = '.' 
36  G0_NO_BLANKS = False 
37  PROC_NO_LEADING_BLANK = False 
38  # The default value if BN, BZ edit descriptors are not specified 
39  PROC_BLANKS_AS_ZEROS = False 
40   
41 -def reset():
42 global RET_WRITTEN_VARS_ONLY, RET_UNWRITTEN_VARS_NONE, PROC_INCL_PLUS, \ 43 PROC_ALLOW_NEG_BOZ, PROC_PAD_CHAR, PROC_NEG_AS_ZERO, PROC_SIGN_ZERO, \ 44 PROC_MIN_FIELD_WIDTH, PROC_DECIMAL_CHAR, G0_NO_BLANKS, \ 45 PROC_NO_LEADING_BLANK, PROC_BLANKS_AS_ZEROS, PROC_MAXINT, G_INPUT_TRIAL_EDS, \ 46 ALLOW_ZERO_WIDTH_EDS 47 G_INPUT_TRIAL_EDS = ['F', 'L', 'A'] 48 if sys.version_info[0] >= 3: 49 PROC_MAXINT = sys.maxsize 50 else: 51 PROC_MAXINT = sys.maxint 52 RET_WRITTEN_VARS_ONLY = False 53 RET_UNWRITTEN_VARS_NONE = True 54 PROC_INCL_PLUS = False 55 PROC_ALLOW_NEG_BOZ = False 56 PROC_PAD_CHAR = ' ' 57 PROC_NEG_AS_ZERO = True 58 PROC_SIGN_ZERO = False 59 PROC_MIN_FIELD_WIDTH = 46 60 PROC_DECIMAL_CHAR = '.' 61 G0_NO_BLANKS = False 62 PROC_NO_LEADING_BLANK = False 63 PROC_BLANKS_AS_ZEROS = False 64 ALLOW_ZERO_WIDTH_EDS = True
65