Google-Apps
Hauptmenü

"Things you shouldn't do"

6 Comments -

1 – 6 of 6
Blogger Vitaly Babiy said...

Is there a python binding for this

4 February 2009 at 16:09

Anonymous Anonymous said...

Heh - I was just going to ask the same Python-binding question :-)

Also: in one case I want to check if a file name is on a local directory (ie. not on gvfs mount) and then get the directory of the file... Currently I use this:

if theUri.startswith("file:///"):
theDir = os.path.dirname(theUri[7:])

Not elegant, and uses a hardcoded file:/ prefix... Any suggestion how to improve this?

4 February 2009 at 16:18

Anonymous Anonymous said...

oliver:
use g_file_is_native()

/ Alex

4 February 2009 at 19:37

Anonymous Anonymous said...

You can also use g_file_get_path() if it returns Non-NULL its a local path. If you do it this way it can return local paths for gvfs mounts too, via fuse. (but is_native() will return FALSE even if fuse is availible).

4 February 2009 at 19:52

Anonymous Anonymous said...

Thank you, Bastien!

4 February 2009 at 20:46

Blogger Kevin Kofler said...

> Use libcanberra instead.

Or Phonon. :-)

5 February 2009 at 12:41

You can use some HTML tags, such as <b>, <i>, <a>

This blog does not allow anonymous comments.

Comment moderation has been enabled. All comments must be approved by the blog author.

You will be asked to sign in after submitting your comment.
Please prove you're not a robot