scottkirkwood / key-mon

Automatically exported from code.google.com/p/key-mon
Apache License 2.0
141 stars 38 forks source link

needs code ported to Python3 #85

Closed androclus closed 2 years ago

androclus commented 4 years ago

Python 2 is nearing end-of-life; many Linux OS's are abandoning P2-based code, including the several dependencies that key-mon requires (python-xlib, pygtk, python-xml, etc.)

key-mon was/is the best screen key/mouse visualizer out there. For the utility to survive, and to help any/everyone who loves this program and uses it, it BADLY needs to be ported to Python 3.

I do not program in Python, and have a full plate, or I would take the port on as a project.

scottkirkwood commented 4 years ago

I'm looking, there are some support libraries like I need to change as well, could be a while.

On Wed, 29 Apr 2020 at 22:08, Jeff Stern notifications@github.com wrote:

Python 2 is nearing end-of-life; many Linux OS's are abandoning P2-based code.

key-mon was/is the best screen key/mouse visualizer out there. For the utility to survive, and to help any/everyone who loves this program and uses it, it BADLY needs to be ported to Python 3.

I do not program in Python, or I would take the port on as a project.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/scottkirkwood/key-mon/issues/85, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABASPKXWWQYWXLKXSYKJDLRPDMSVANCNFSM4MVC5HYA .

mclegrand commented 4 years ago

I tried to fix this in #87 , which may need some testing and update to documentation & packaging

ahangarha commented 4 years ago

I just tested on 11a4d19 commit and everything seems working except one thing:

ahangarha commented 4 years ago

I have also noticed these warnings if I run key-mon in terminal:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/keymon/settings.py", line 142, in _combo_changed
    self._update_option(option, val, str_val)
  File "/usr/local/lib/python3.8/dist-packages/keymon/settings.py", line 150, in _update_option
    setattr(self.settings.options, option, str_val)
  File "/usr/local/lib/python3.8/dist-packages/keymon/options.py", line 271, in __setattr__
    self.__dict__['_options'][name].value = value
  File "/usr/local/lib/python3.8/dist-packages/keymon/options.py", line 185, in _set_value
    self._set_attr_value('_value', val)
  File "/usr/local/lib/python3.8/dist-packages/keymon/options.py", line 169, in _set_attr_value
    setattr(self, attr, float(val))
ValueError: could not convert string to float: ''

I couldn't figure out in what circumstances it happens!

RYNEQ commented 4 years ago

I seems there is some dependency problems. I was able to successfully run the latest commit by installing PyGObject, pycairo and python3-xlib from pip (not the debian repo) in virtualenv and everything seems stable (not fully tested)

scottkirkwood commented 2 years ago

It's all working now with Python3 thanks for everyone's help.