Comment 4 for bug 1826627

Revision history for this message
costales (costales) wrote : Re: [Bug 1826627] Re: Nemo version 4.0.x + requires extensions to be Python3 compatible

Hi Steve,

Appears Nemo runs python2 in previous versions.

The official examples, doesn't invoke the Python version. But they deal
with this issue importing at the start checking an exception:
https://github.com/GNOME/nautilus-python/blob/master/examples/open-terminal.py

# A way to get unquote working with python 2 and 3
try:
from urllib import unquote
except ImportError:
from urllib.parse import unquote

And then, calling the library as:

filename = unquote(file.get_uri()[7:])

Please, could you confirm me that this is working in your system?

Thanks in advance and an hug.