My current requirement is to write a script in Python 2.4.3
which comes bundled wit RHEL 5 . But few years down the line say 5 yrs ,the server may be upgraded to RHEL 8 or 9 which comes with Python 3
. So I am supposed to write the code which is compatible with both version. Now my scripts contain basic operations such as creating directories, unzipping files, file manipulations, XML file reading ( which I am doing now with minidom
) and some hashing.
Now I found out that a tool called python-modernize
does the work which is built on top of 2to3
. I searched for the tool but I got a tar.gz file . It does not contain a python-modernize file as they say it in its usage. But all I found was a setup.py
file. I am new to Python and all I know is that something is done with pip
. But I also read that using pip is a tough work for Python 2.4.3 .
Please tell me how I can get the job done.
I also referred this but couldn't find how to use the tool.
Also please let me know if there are any good alternative to this.