Damjan Jovanovic wrote:
On Sat, Sep 28, 2024 at 12:11 PM Matthias Seidel
<matthias.sei...@hamburg.de <mailto:matthias.sei...@hamburg.de>> wrote:
Hi All,
Until now I could run the python scripts here:
https://svn.apache.org/repos/asf/openoffice/devtools/aoo-stats/
because I still was able to install Python 2 on Ubuntu 22.04.
After upgrading to Ubuntu 24.04 I cannot do this anymore. Running the
scripts with Python 3 gives me errors.
Could someone with Python knowledge have a look at those scripts,
please?
Regards,
Matthias
Hi
You haven't really given examples of how to run those scripts, but I
think I fixed one of them.
I just had to:
* Change the urllib import to urllib.request:
-import urllib
+import urllib.request
* Delete the unused and now invalid urllib.urlencode import:
-from urllib import urlencode
* Change urllib.urlopen() to urllib.request.urlopen():
- conn = urllib.urlopen(url)
+ conn = urllib.request.urlopen(url)
* Change every print x to print(x).
The complete patch is attached so you can test it with Python 3. I am
not sure how to run it or what output it's supposed to give.
Regards
Damjan
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org
If I remember correctly, it is not the scrips per se, it is that python2
is unsupported. I believe that the code too implament Python 3 is
already in trunk, and possibly in Version 4.2.0. One of the developers
will hopefully correct any of my erroneous statements. I just help write
the documentation and am not a programmer.
Regards
Keith N. McKenna
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org