Fix Nautilus URIs in a Python script

Posted by Pablo on Ask Ubuntu See other posts from Ask Ubuntu or by Pablo
Published on 2012-03-31T20:40:09Z Indexed on 2012/03/31 23:43 UTC
Read the original article Hit count: 341

Filed under:
|
|

I have a very basic Python script I wrote mostly for learning purposes. It opens a terminal in the current folder. However, I can't get it to work in folders with accented characters in the URI (e.g.: /home/pablo/Vídeos or /home/pablo/Área de Trabalho), because it looks like Nautilus URIs are encoded to those %{number} values. Is there a way to convert these URIs to normalized URIs without having to translate every possible accented value by hand?

Thanks in advance!

© Ask Ubuntu or respective owner

Related posts about nautilus

Related posts about python