File size: 143 Bytes
677c57e
 
 
 
 
 
 
 
 
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