# Path: lcopt/data_store.py
# class LcoptStorage():
#     def __init__(self):
#     def load_config(self):
#     def refresh(self):
#     def write_default_config(self):
#     def write_config(self, config):
#     def models(self):
#     def search_indices(self):
#     def project_type(self):
#     def single_project_name(self):
#     def ecoinvent_version(self):
#     def ecoinvent_system_model(self):
#     def save_option(self):


import pickle
import os
from .data_store import storage
                      'parameter_sets',
                      'external_databases',
                      'parameter_map',
                      'sandbox_positions',
                      'ecoinventName',
                      'biosphereName',
                      'analysis_settings',
                      'technosphere_databases',
                      'biosphere_databases',
                      'result_set',
                      'evaluated_parameter_sets'
                      ]

        for attr in attributes:
            if hasattr(self.modelInstance, attr):
                self.view_data[attr] = getattr(self.modelInstance, attr)

        if hasattr(self.modelInstance, 'matrix'):
            self.view_data['matrix'] = getattr(self.modelInstance, 'matrix').tolist()

    def export(self, filename=None):
        if filename is None:
            filename = self.modelInstance.name.replace(" ", "_")

        if filename[-10:] != '.lcoptview':
            filename += '.lcoptview'

        if self.modelInstance.save_option == 'curdir':
            base_dir = os.getcwd()
        else:

# Path: lcopt/data_store.py
# class LcoptStorage():
#     def __init__(self):
#     def load_config(self):
#     def refresh(self):
#     def write_default_config(self):
#     def write_config(self, config):
#     def models(self):
#     def search_indices(self):
#     def project_type(self):
#     def single_project_name(self):
#     def ecoinvent_version(self):
#     def ecoinvent_system_model(self):
#     def save_option(self):


# Path: lcopt/export_view.py
import pickle
import os
from .data_store import storage

                      'parameter_sets',
                      'external_databases',
                      'parameter_map',
                      'sandbox_positions',
                      'ecoinventName',
                      'biosphereName',
                      'analysis_settings',
                      'technosphere_databases',
                      'biosphere_databases',
                      'result_set',
                      'evaluated_parameter_sets'
                      ]

        for attr in attributes:
            if hasattr(self.modelInstance, attr):
                self.view_data[attr] = getattr(self.modelInstance, attr)

        if hasattr(self.modelInstance, 'matrix'):
            self.view_data['matrix'] = getattr(self.modelInstance, 'matrix').tolist()

    def export(self, filename=None):
        if filename is None:
            filename = self.modelInstance.name.replace(" ", "_")

        if filename[-10:] != '.lcoptview':
            filename += '.lcoptview'

        if self.modelInstance.save_option == 'curdir':
            base_dir = os.getcwd()
        else:

            base_dir = storage.lcoptview_dir