<div dir="ltr">Hi All ,<div><br></div><div>           I am new to python just completed 4 lecture on python, I am  looking for a pyhton script of module which check the versions of the rpm in linux .</div><div><br></div><div>          I have a situation in which I have two list list1 and list2 :</div><div><br></div><div>list1 is prerequisites rpm for application</div><div><br></div><div>and list2 is the list of rpm's in the system           <pre style="background-color:rgb(255,255,255);color:rgb(0,0,0);font-family:"Courier New";font-size:12pt">list1 = [<br>        <span style="color:rgb(0,128,0);font-weight:bold">"binutils-2.23.52.0.1-12.el7.x86_64"</span>,<br>        <span style="color:rgb(0,128,0);font-weight:bold">"compat-libcap1-1.10-3.el7.x86_64"</span>,<br>        <span style="color:rgb(0,128,0);font-weight:bold">"compat-libstdc++-33-3.2.3-71.el7.i686"</span>,<br>        <span style="color:rgb(0,128,0);font-weight:bold">"compat-libstdc++-33-3.2.3-71.el7.x86_64"</span>,<br>        <span style="color:rgb(0,128,0);font-weight:bold">"gcc-4.8.2-3.el7.x86_64"</span>,<br>        <span style="color:rgb(0,128,0);font-weight:bold">"gcc-c++-4.8.2-3.el7.x86_64"</span>,<br>        <span style="color:rgb(0,128,0);font-weight:bold">"glibc-2.17-36.el7.i686"</span>,<br>        <span style="color:rgb(0,128,0);font-weight:bold">"glibc-2.17-36.el7.x86_64"</span>,<br>        <span style="color:rgb(0,128,0);font-weight:bold">"glibc-devel-2.17-36.el7.i686"</span>,<br>        <span style="color:rgb(0,128,0);font-weight:bold">"glibc-devel-2.17-36.el7.x86_64"</span>,<br>        <span style="color:rgb(0,128,0);font-weight:bold">"ksh"</span>,<br>        <span style="color:rgb(0,128,0);font-weight:bold">"libaio-0.3.109-9.el7.i686"</span>,<br>        <span style="color:rgb(0,128,0);font-weight:bold">"libaio-0.3.109-9.el7.x86_64"</span>,<br>        <span style="color:rgb(0,128,0);font-weight:bold">"libaio-devel-0.3.109-9.el7.i686"</span>,<br>        <span style="color:rgb(0,128,0);font-weight:bold">"libaio-devel-0.3.109-9.el7.x86_64"</span>,<br>        <span style="color:rgb(0,128,0);font-weight:bold">"libgcc-4.8.2-3.el7.i686"</span>,<br>        <span style="color:rgb(0,128,0);font-weight:bold">"libgcc-4.8.2-3.el7.x86_64"</span>,<br>        <span style="color:rgb(0,128,0);font-weight:bold">"libstdc++-4.8.2-3.el7.i686"</span>,<br>        <span style="color:rgb(0,128,0);font-weight:bold">"libstdc++-4.8.2-3.el7.x86_64"</span>,<br>        <span style="color:rgb(0,128,0);font-weight:bold">"libstdc++-devel-4.8.2-3.el7.i686"</span>,<br>        <span style="color:rgb(0,128,0);font-weight:bold">"libstdc++-devel-4.8.2-3.el7.x86_64"</span>,<br>        <span style="color:rgb(0,128,0);font-weight:bold">"libXi-1.7.2-1.el7.i686"</span>,<br>        <span style="color:rgb(0,128,0);font-weight:bold">"libXi-1.7.2-1.el7.x86_64"</span>,<br>        <span style="color:rgb(0,128,0);font-weight:bold">"libXtst-1.2.2-1.el7.i686"</span>,<br>        <span style="color:rgb(0,128,0);font-weight:bold">"libXtst-1.2.2-1.el7.x86_64"</span>,<br>        <span style="color:rgb(0,128,0);font-weight:bold">"make-3.82-19.el7.x86_64"</span>,<br>        <span style="color:rgb(0,128,0);font-weight:bold">"sysstat-10.1.5-1.el7.x86_64"</span>,<br>]</pre><div>lsit2 = ['acl-2.2.51-12.el7.x86_64', 'adcli-0.8.1-3.el7.x86_64', 'audit-2.7.6-3.el7.x86_64', 'audit-libs-2.7.6-3.el7.i686', 'audit-libs-2.7.6-3.el7.x86_64', 'audit-libs-python-2.7.6-3.el7.x86_64', 'authconfig-6.2.8-30.el7.x86_64', 'autofs-5.0.7-70.0.1.el7_4.1.x86_64', 'autogen-libopts-5.18-5.el7.x86_64', 'avahi-autoipd-0.6.31-17.el7.x86_64', 'avahi-libs-0.6.31-17.el7.x86_64', 'bash-4.2.46-29.el7_4.x86_64', 'bc-1.06.95-13.el7.x86_64', 'bind-libs-9.9.4-51.el7_4.2.x86_64', 'bind-libs-lite-9.9.4-51.el7_4.2.x86_64', 'bind-license-9.9.4-51.el7_4.2.noarch', 'bind-utils-9.9.4-51.el7_4.2.x86_64', 'binutils-2.25.1-32.base.el7_4.2.x86_64', 'biosdevname-0.7.2-2.el7.x86_64', 'btrfs-progs-4.9.1-1.0.2.el7.x86_64', 'bzip2-1.0.6-13.el7.x86_64', 'bzip2-libs-1.0.6-13.el7.i686', 'bzip2-libs-1.0.6-13.el7.x86_64', 'ca-certificates-2017.2.14-71.el7.noarch', 'c-ares-1.10.0-3.el7.x86_64', 'checkpolicy-2.5-4.el7.x86_64', 'chkconfig-1.7.4-1.el7.x86_64', 'compat-libcap1-1.10-7.el7.x86_64', 'compat-libstdc++-33-3.2.3-72.el7.i686', 'compat-libstdc++-33-3.2.3-72.el7.x86_64', 'coreutils-8.22-18.0.1.el7.x86_64', 'cpio-2.11-25.el7_4.x86_64', 'cpp-4.8.5-16.0.3.el7_4.2.x86_64', 'cracklib-2.9.0-11.el7.i686', 'cracklib-2.9.0-11.el7.x86_64', 'cracklib-dicts-2.9.0-11.el7.x86_64', 'cronie-1.4.11-17.el7.x86_64', 'cronie-anacron-1.4.11-17.el7.x86_64']</div></div><div><br></div><div>I would like to do a rpm version check between the two list  (list1 and list2)</div><div><br></div><div>so it only prints the rpm from list1 which are not installed and version available in list2 is higher or lower .</div><div><br></div><div> Thanks in advance ,</div><div><br></div><br><div class="gmail_quote"><div dir="ltr">On Sat, Jul 28, 2018 at 1:31 AM <<a href="mailto:python-uk-request@python.org">python-uk-request@python.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Welcome to the <a href="mailto:python-uk@python.org" target="_blank">python-uk@python.org</a> mailing list! Welcome to the<br>
python-uk mailing list.<br>
<br>
This list is to help UK Python users to form a community, arrange<br>
events, advertise help or jobs wanted or sought and generally chat.<br>
<br>
<br>
To post to this list, send your message to:<br>
<br>
  <a href="mailto:python-uk@python.org" target="_blank">python-uk@python.org</a><br>
<br>
General information about the mailing list is at:<br>
<br>
  <a href="https://mail.python.org/mailman/listinfo/python-uk" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/python-uk</a><br>
<br>
If you ever want to unsubscribe or change your options (eg, switch to<br>
or from digest mode, change your password, etc.), visit your<br>
subscription page at:<br>
<br>
  <a href="https://mail.python.org/mailman/options/python-uk/asad.hasan2004%40gmail.com" rel="noreferrer" target="_blank">https://mail.python.org/mailman/options/python-uk/asad.hasan2004%40gmail.com</a><br>
<br>
<br>
You can also make such adjustments via email by sending a message to:<br>
<br>
  <a href="mailto:python-uk-request@python.org" target="_blank">python-uk-request@python.org</a><br>
<br>
with the word `help' in the subject or body (don't include the<br>
quotes), and you will get back a message with instructions.<br>
<br>
You must know your password to change your options (including changing<br>
the password, itself) or to unsubscribe without confirmation.  It is:<br>
<br>
  Welc0me@1<br>
<br>
Normally, Mailman will remind you of your <a href="http://python.org" rel="noreferrer" target="_blank">python.org</a> mailing list<br>
passwords once every month, although you can disable this if you<br>
prefer.  This reminder will also include instructions on how to<br>
unsubscribe or change your account options.  There is also a button on<br>
your options page that will email your current password to you.<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Asad Hasan<br>+91 9582111698</div></div></div>