Python Forum
[split] suggestion required for new script - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: [split] suggestion required for new script (/thread-9218.html)



[split] suggestion required for new script - anna - Mar-27-2018

Hi All,

suggestion required for new script

I have below OIDs

Sr.No OID Remark
1 1.3.6.1.4.1.3902.1082.500.10.2.3.3.1.2 Customers
2 1.3.6.1.4.1.3902.1082.500.10.2.3.3.1.3 ONU
3 1.3.6.1.4.1.3902.1082.500.10.2.3.8.1.4 ONU Status
4 1.3.6.1.2.1.31.1.1.1.1 PON Port
5 1.3.6.1.2.1.2.2.1.7 admin status
6 1.3.6.1.2.1.2.2.1.8 Oper Status

need to print output in below format

PON Port admin status op Status ONU Customer ONU Status


please suggest.
My plan is to collect each OID output in List and print, but length of each list is different.


RE: [split] suggestion required for new script - nilamo - Mar-27-2018

Split on space, Remark looks like it'd be all elements past the second, then insert into a dict with the Remark as the key, and print?