Skip to content
This repository was archived by the owner on Jul 27, 2021. It is now read-only.

Customizable working directory  #165

@vinci1it2000

Description

@vinci1it2000

Add an option for selecting where to place the working directory (.co2mpas). It could be during the installation or adding a setting menu so it can be specified after the installation.

An alternative could be to move the working directory .co2mpas inside the installation path (it could be also the package folder), so the user can uninstall co2mpas and all sensitive data once deleting the installation folder.

To create the CO2MPAS_HOME variable, so you can use in the rest of your code, you can add the following code in the init file and create a new directory home in the library folder

import os
import os.path as osp
CO2MPAS_HOME = os.environ.get('CO2MPAS_HOME', osp.join(osp.dirname(__file__),  'home'))
os.environ['CO2MPAS_HOME'] = CO2MPAS_HOME 

Note the latest solution is not the best approach but it works and should be fast to integrate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions