questions about how sysfs.py works
by Guy Streeter
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I'm making an effort to understand how all of tuna works (this is admirable,
not folly, correct?). There's a part of the reload() function in the cpus
class that I don't understand. to start with:
for socket in sockets_to_sort:
self.sockets[socket].sort()
Here self.sockets[socket] is a list of cpu objects. The cpu class is not an
orderable type. It does not provide it's own comparison function, and cannot
be converted to an integer value. What is the (intended) result of calling
the list's sort() function?
Another thing: these lines are indented so as to be included in the outer
loop. It seems these lines need only to be run after the other loop is complete.
I think I must be missing something, since the code seems to work. Although,
I can't find any place that depends on self.sockets[socket] being sorted in
any meaningful way.
thanks,
- --Guy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iEYEARECAAYFAlP/pq8ACgkQ0Bme0QyNhPTBlgCgqhofpM/Vo1AweHo2WskpIS0Y
4UcAnAvdmi7z/h1c05bhER/wmm3LA4go
=jwbb
-----END PGP SIGNATURE-----
9 years, 1 month
correct mixed tabs and spaces in is_hardirq
by Guy Streeter
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I have my editor set up to show tabs as 4 spaces, and the mix of tabs and
spaces made this program flow very hard to read.
- --Guy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iEYEARECAAYFAlP/g2QACgkQ0Bme0QyNhPSRLACfYebqD72mdqD8PoCeZTFKlpKi
VUIAoI9TVDquVOIkAHnz6gF4vFAzZcTQ
=Ya2/
-----END PGP SIGNATURE-----
9 years, 3 months
future tuna development and Python 3
by Guy Streeter
As far as I have been able to tell, Python 2 will continue to be distributed
in Fedora, at least for the foreseeable future. Upstream python developers say
they will continue to do security fixes and some bugfixes for python 2.7
through 2020, and possibly longer. Given this, I don't know how important
moving tuna to Python 3 really is.
It looks like it would be a significant undertaking if we do it. In addition
to the syntax changes, which are straightforward, there is the matter of the
Gtk implementation change, and then all of the module dependencies.
python-ethtool and python-schedutils are written in C, and I have no idea if
it's just a matter of recompiling to make them Python 3, or if they need to be
rewritten. python-linux-procfs is written in Python, so it should not be
difficult to port.
Personally, I really want to forget Python 2 and just write in Python 3 from
now on. I'd like to propose some enhancements to the tuna GUI (more on that in
another email), but I don't want to write them in Python 2, especially if they
need to be changed for Python 3 in the future.
Does anyone else have opinions (or knowledge) about Python 3 and future tuna
development? Would anyone like to collaborate on an attempt to port it?
thanks,
--Guy
9 years, 4 months