File size: 143 Bytes
b50f432
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
import os

class path :

def get_parent_path(path,levels=1):
    for _ in range(levels):
        path = os.path.dirname(path)
    return path