fvwm-menu-desktop and Python 3

Jaimos Skriletz <[email protected]>
Newsgroups gmane.comp.window-managers.fvwm.devel
Message-ID <CAJabFbgVjuGCkaXCbfxqQfSF1da22FA8i+dTT5o6_D4pqh_UKw@mail.gmail.com>
Hello,

I am trying to update the fvwm-menu-desktop script to work in python 3
while being python 2 compatible, since python 2 is nearing end of
life.

I first ran 2to3 on the script and it fixed the majority the syntax
differences. But the script's output had some encoding issues due to
differences in python 2 and 3 in terms of utf-8. I was able to trace
down the issues and get them to work on my system, mostly by bypassing
the decoding/encoding function if using python 3 (I think this is
okay, because python 3 should support utf-8 in strings by default and
not need to encode/decode them).

Just seeing if anyone would want to test the script on their setup if
they use it to see if it works both with Python 3 and Python 2, and
especially with someone who has menus that uses lots of utf-8
characters with accents in them.

You can find the changes in the branch js/fvwm-menu-desktop

You may have to change the she-bang at the top of the script to
#!/usr/bin/python3 if it gets built with python 2.

Thanks,

jaimos
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.