Take a look at this: http://docs.python.org/library/os.path.html. There is a dirname function which might help. Dont know if it will work for remote URIs as well. Just try it out.
0
Gang Chen
On
First get the GFile for the dir, then get the name of the dir:
GFile* dir = g_file_get_parent(gfile));
char* dir_name = g_file_get_parse_name(dir);
Take a look at this: http://docs.python.org/library/os.path.html. There is a dirname function which might help. Dont know if it will work for remote URIs as well. Just try it out.