File size: 468 Bytes
0b619bd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env python
r"""_summary_
-*- coding: utf-8 -*-

Module : configs.utils

File Name : utils.py

Description : utils about path

Creation Date : 2024-07-13

Author : Frank Kang([email protected])
"""
import os
ROOT = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))


def get_dir(config_dir):
    if config_dir.startswith('.'):
        return os.path.realpath(os.path.join(ROOT, config_dir))
    else:
        return os.path.realpath(config_dir)