Exemplo n.º 1
0
def get_extension(interp, this):
    path = this.file_name
    filename = rpath.split(path)[1]
    name_split = filename.rsplit('.', 1)
    if len(name_split) == 2:
        filename, extension = name_split
    else:
        extension = ''
    return interp.space.wrap(extension)
Exemplo n.º 2
0
def get_extension(interp, this):
    path = this.file_name
    filename = rpath.split(path)[1]
    return _extension(interp, filename)
Exemplo n.º 3
0
def get_extension(interp, this):
    path = this.file_name
    filename = rpath.split(path)[1]
    return _extension(interp, filename)