@@ -40,8 +40,8 @@ def write_default_config(name, **kwargs):
40
40
if ('/' in name ) and (name .rindex ('/' ) > 0 ) and (not os .path .exists (name [:name .rindex ('/' )])):
41
41
os .system ('mkdir %s' % name [:name .rindex ('/' )])
42
42
43
- # read default config.py from package installation
44
- with open (pkg_resources .resource_filename ('casaconfig' , 'config .py' ), 'r' ) as fid :
43
+ # read default values from package installation
44
+ with open (pkg_resources .resource_filename ('casaconfig' , '_config_defaults .py' ), 'r' ) as fid :
45
45
config = fid .read ()
46
46
47
47
# modify specified keys
@@ -62,8 +62,8 @@ def main():
62
62
parser = argparse .ArgumentParser (prog = 'write_default_config' , description = 'write out a default casa configuration file' )
63
63
parser .add_argument ('outfile' , help = 'output filename to write the configuration to' )
64
64
65
- # open the default config.py inside this package and parse it to extract the default parameters/values
66
- with open (pkg_resources .resource_filename ('casaconfig' , 'config .py' ), 'r' ) as fid :
65
+ # open the default values inside this package and parse it to extract the default parameters/values
66
+ with open (pkg_resources .resource_filename ('casaconfig' , '_config_defaults .py' ), 'r' ) as fid :
67
67
config = fid .read ()
68
68
options = re .findall ('\n \#(.+?)\n \s*(\S+?)\s*\=\s*(.+?)\n ' , config , flags = re .DOTALL )
69
69
@@ -79,4 +79,4 @@ def main():
79
79
except :
80
80
set_args += [(arg , args [arg ])]
81
81
set_args = dict (set_args )
82
- write_default_config (args ['outfile' ], ** set_args )
82
+ write_default_config (args ['outfile' ], ** set_args )
0 commit comments