From 7c92e717d68c217c51f7422793894ceaf03bd048 Mon Sep 17 00:00:00 2001 From: Frederic Back Date: Mon, 2 Oct 2006 13:33:49 +0000 Subject: * Cleaned up method names in fringui git-svn-id: file:///home/lennart/svn/public/fring/trunk@54 d0d2c35f-0a1e-0410-abeb-dabff30a67ee --- src/fringlib/fringutil.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/fringlib/fringutil.py') diff --git a/src/fringlib/fringutil.py b/src/fringlib/fringutil.py index 4bfa5d7..f981a45 100644 --- a/src/fringlib/fringutil.py +++ b/src/fringlib/fringutil.py @@ -1,3 +1,10 @@ +import os + +def get_parent_from_uri(uri): + """ Get the parent folder from an uri """ + p = os.path.split(uri) + p = os.path.join(p[:-1]) + return p[0] def pretty_size(size): if size >= 1024*1024*1024: -- cgit