I'm working on a script to use python within NetMRI to get our network devices to download their code from a local SCP server without intervention. I'm running under the assumption that I can use NetMRI in the place of something like ansible to actually reach out and touch the devices (Please let me know if I'm wrong!)

The problem I keep running into is that NetMRI will run the script fine, but will only peform the first "show version" and then stop.

How do I take the output from a command and put it into a python variable without NetMRI just running the command and telling me it's finished?

The python portion actually works quite well, I can run it on other boxes with no issue. My main problem is getting this to work with NetMRI. Also please excuse the mess, I'm sure there are better ways to write this, I'm just a noob.

Re: Python scripting to download Cisco IOS

Thanks again for replying.I was able to get the syntax right and the command works. I'm having an issue now where the command is saying complete before the file transfer is finished. (I opened a new thread, figured that would be best)

Re: Python scripting to download Cisco IOS

Cisco has composed a python apparatus, known as Cisco Automatic Upgrade Tool, that updates an IOS-XR gadget with pre and post checks. Did you check Cisco CPOC video? It clarifies almost everything about this instrument which you should watch before begin perusing this post.