Hi all!
Could anybody tell me where /opt/trinity/share/apps/imagerotation/orient.py and /opt/trinity/share/apps/imagerotation/exif.py are used?
The only reference I found was in /opt/trinity/bin/jpegorient which by itself is referenced in /opt/trinity/share/apps/konqueror/servicemenus/jpegorient.desktop ... but the defined "rotate" operation is not to be found anywhere in konqueror, neither in the context menu of a jpg file nor in the properties dialog.
These 4 files are the only reason for python2.7 on my system and I do not see why it's actually needed any more.
Nik
Anno domini 2021 Sat, 3 Jul 19:20:42 +1000 Steven D'Aprano via tde-users scripsit:
On Sat, Jul 03, 2021 at 11:02:04AM +0200, Dr. Nikolaus Klepp wrote:
These 4 files are the only reason for python2.7 on my system and I do not see why it's actually needed any more.
What Linux distro are you running that Python 2.7 isn't the system Python?
Devuan chimaera. It's the same on Debian 11, next release will not have python 2 any more. The only thing that breaks with python 2 removed (well, aside python-trinity-trinity) is konq-plugins-trinity, which at least on my system does not use python at all. Even the *.py files present are not used.
Nik
On Sat, 3 Jul 2021 19:20:42 +1000 "Steven D'Aprano via tde-users" users@trinitydesktop.org wrote:
On Sat, Jul 03, 2021 at 11:02:04AM +0200, Dr. Nikolaus Klepp wrote:
These 4 files are the only reason for python2.7 on my system and I do not see why it's actually needed any more.
What Linux distro are you running that Python 2.7 isn't the system Python?
Python 2.7 was declared dead by python.org more than a year ago now:
https://www.python.org/doc/sunset-python-2/
Any up-to-date Linux distro should have Python 3 as primary.
(It was a big deal on Gentoo because Gentoo's primary package manager is written in Python. The transition produced enough developer drama for a soap opera.)
E. Liddell
Anno domini 2021 Sat, 3 Jul 13:31:25 -0400 E. Liddell scripsit:
On Sat, 3 Jul 2021 19:20:42 +1000 "Steven D'Aprano via tde-users" users@trinitydesktop.org wrote:
On Sat, Jul 03, 2021 at 11:02:04AM +0200, Dr. Nikolaus Klepp wrote:
These 4 files are the only reason for python2.7 on my system and I do not see why it's actually needed any more.
What Linux distro are you running that Python 2.7 isn't the system Python?
Python 2.7 was declared dead by python.org more than a year ago now:
https://www.python.org/doc/sunset-python-2/
Any up-to-date Linux distro should have Python 3 as primary.
Exactctly.
I did some more research: replacing python-all with a dummy package and then purging all python2-stuff does exactly no harm at all to TDE 14.1. I created the dummy package with equivs and this config file:
Section: misc Priority: optional Standards-Version: 3.9.2 Package: python-all Version: 2.7.18-2 Provides: python-all:any (= 2.7.18-2) Description: dummy for python-all aka python2.7
Could somebody with more insight please check this?
Nik
(It was a big deal on Gentoo because Gentoo's primary package manager is written in Python. The transition produced enough developer drama for a soap opera.)
E. Liddell ____________________________________________________ tde-users mailing list -- users@trinitydesktop.org To unsubscribe send an email to users-leave@trinitydesktop.org Web mail archive available at https://mail.trinitydesktop.org/mailman3/hyperkitty/list/users@trinitydeskto...
Another thought comes to mind...
On Sat, Jul 03, 2021 at 11:02:04AM +0200, Dr. Nikolaus Klepp wrote:
Could anybody tell me where /opt/trinity/share/apps/imagerotation/orient.py and /opt/trinity/share/apps/imagerotation/exif.py are used?
You could try renaming them to .py.bo extensions, and see what breaks. But if there is a .pyc or .pyo file, you will need to rename those as well.
My guess is that they're probably something to do with previewing images.
Anno domini 2021 Sat, 3 Jul 19:26:12 +1000 Steven D'Aprano via tde-users scripsit:
Another thought comes to mind...
On Sat, Jul 03, 2021 at 11:02:04AM +0200, Dr. Nikolaus Klepp wrote:
Could anybody tell me where /opt/trinity/share/apps/imagerotation/orient.py and /opt/trinity/share/apps/imagerotation/exif.py are used?
You could try renaming them to .py.bo extensions, and see what breaks. But if there is a .pyc or .pyo file, you will need to rename those as well.
My guess is that they're probably something to do with previewing images.
That's the problem: nothing braks and it not used - at least on my 14.1
On 2021/07/03 6:02:04 PM, Dr. Nikolaus Klepp wrote:
These 4 files are the only reason for python2.7 on my system and I do not see why it's actually needed any more.
yeah..... dropping python 2 and move to p:ython 3 is one of the things we want/need to do .... it will come at some point :-) Cheers Michele
Anno domini 2021 Sat, 3 Jul 18:45:02 +0900 Michele Calgaro via tde-users scripsit:
On 2021/07/03 6:02:04 PM, Dr. Nikolaus Klepp wrote:
These 4 files are the only reason for python2.7 on my system and I do not see why it's actually needed any more.
yeah..... dropping python 2 and move to p:ython 3 is one of the things we want/need to do .... it will come at some point :-) Cheers Michele
Hi Michele,
could you plese check on your system if /opt/trinity/bin/jpegorient is used? On my 14.1 it looks like it is totally ignored. orient.py/exif.py also look like they are totally dysfunctinal - not only from konquaror, but from the commandline, too. /opt/trinity/bin/jpegorient (if it is needed) should use exiftools to modify image orientation and drop orient.py + exif.py.
Nik
Dne so 3. července 2021 12:35:42 Dr. Nikolaus Klepp napsal(a):
Anno domini 2021 Sat, 3 Jul 18:45:02 +0900
Michele Calgaro via tde-users scripsit:
On 2021/07/03 6:02:04 PM, Dr. Nikolaus Klepp wrote:
These 4 files are the only reason for python2.7 on my system and I do not see why it's actually needed any more.
yeah..... dropping python 2 and move to p:ython 3 is one of the things we want/need to do .... it will come at some point :-) Cheers Michele
Hi Michele,
could you plese check on your system if /opt/trinity/bin/jpegorient is used? On my 14.1 it looks like it is totally ignored. orient.py/exif.py also look like they are totally dysfunctinal - not only from konquaror, but from the commandline, too. /opt/trinity/bin/jpegorient (if it is needed) should use exiftools to modify image orientation and drop orient.py + exif.py.
Nik
Hi Nik
the jpegorient script is referenced as a service for Konqueror, which is provided for JPEG files. This script uses an "orient.py" that internally uses "exif.py". If these scripts are not successful, "jpegtran" is searched and used.
Here it may be a question of whether to deal with the modification of these scripts in order to be compatible with Python3 or whether to discard them and rely exclusively on jpegtran.
Cheers
Hi Slavek,
Anno domini 2021 Sun, 4 Jul 15:55:53 +0200 Slávek Banko via tde-users scripsit:
Dne so 3. července 2021 12:35:42 Dr. Nikolaus Klepp napsal(a):
Anno domini 2021 Sat, 3 Jul 18:45:02 +0900
Michele Calgaro via tde-users scripsit:
On 2021/07/03 6:02:04 PM, Dr. Nikolaus Klepp wrote:
These 4 files are the only reason for python2.7 on my system and I do not see why it's actually needed any more.
yeah..... dropping python 2 and move to p:ython 3 is one of the things we want/need to do .... it will come at some point :-) Cheers Michele
Hi Michele,
could you plese check on your system if /opt/trinity/bin/jpegorient is used? On my 14.1 it looks like it is totally ignored. orient.py/exif.py also look like they are totally dysfunctinal - not only from konquaror, but from the commandline, too. /opt/trinity/bin/jpegorient (if it is needed) should use exiftools to modify image orientation and drop orient.py + exif.py.
Nik
Hi Nik
the jpegorient script is referenced as a service for Konqueror, which is provided for JPEG files. This script uses an "orient.py" that internally uses "exif.py". If these scripts are not successful, "jpegtran" is searched and used.
orent.py & exif.py are quite disfunctional on jpegs without exif. But where are these files used? I did not find nor see any difference in konqueror with or without jpegtran.
Here it may be a question of whether to deal with the modification of these scripts in order to be compatible with Python3 or whether to discard them and rely exclusively on jpegtran.
I'd suggest exiftool for reading/writing the orientation and jpegtran for destructive modifications. BTW, jpegtan-mmx is gone for ~ a decade now, might be time to clean up that code anyway :)
But still I don't see where/when jpegorient is called. Do you have an example for me how I can see that in action?
Nik
Cheers