Draft: Resolve "Conditional imports"
Closes #22
Merge request reports
Activity
added Enhancement discussion labels
assigned to @nixdorf
read config changes the working directory, this is not good if modules should be loaded separately later in the script Please consider to keep working directory and assign output_dir instead I will add a temporary workaround
`def read_config(file, chdir=False): # Config config = configparser.ConfigParser() if file is None: file = 'config.cfg' if not os.path.isfile(file): print(cprintf('! Config file required! Either specify it as an argument or provide ./config.cfg', 'red')) return() else: print("i Working with %s" % file)
temp = config.read(file) if chdir: # Change to this directory config_dir, config_file_name = os.path.split(file) os.chdir(os.path.normpath(config_dir))`
@schroen I did the changes, maybe you can check in a virtual environment where no geospatial libs are installed Temporary solutions can be replaced as soon as the
read_config
issue is solved@schroen could you give a feedback on the merge request? It is quite some commits behind master now !