()
return paths
Return system-dependent OpenSCAD library paths or paths defined in os.environ['OPENSCADPATH']
Return system-dependent OpenSCAD library paths or paths defined in os.environ['OPENSCADPATH']
Return system - dependent OpenSCAD library paths or paths defined in os . environ [ OPENSCADPATH ]
def _openscad_library_paths() -> List[Path]:
    """
    Return system-dependent OpenSCAD library paths or paths defined in os.environ['OPENSCADPATH']
    """
    import platform
    import os
    import re

    paths = [Path('.')]

    user_path = os.environ.get('OPENSCADPATH')
    if user_path:
        for s in re.split(r'\s*[;:]\s*', user_path):
            paths.append(Path(s))

    default_paths = {
        'Linux':   Path.home() / '.local/share/OpenSCAD/libraries',
        'Darwin':  Path.home() / 'Documents/OpenSCAD/libraries',
        'Windows': Path('My Documents\OpenSCAD\libraries')
    }

    paths.append(default_paths[platform.system()])
    return paths
def _openscad_library_paths ( ) -> List [ Path ] : import platform import os import re paths = [ Path ( '.' ) ] user_path = os . environ . get ( 'OPENSCADPATH' ) if user_path : for s in re . split ( r'\s*[;:]\s*' , user_path ) : paths . append ( Path ( s ) ) default_paths = { 'Linux' : Path . home ( ) / '.local/share/OpenSCAD/libraries' , 'Darwin' : Path . home ( ) / 'Documents/OpenSCAD/libraries' , 'Windows' : Path ( 'My Documents\OpenSCAD\libraries' ) } paths . append ( default_paths [ platform . system ( ) ] ) return paths