I have a generic script in another language which I use to query an ASA5500 firewall. Because of thousands of possibilities in even the 'show' commands, I write small .cmd files which are macro-executed from the main script. A .cmd file looks something like
showline("terminal pager 50000",0)
Each of the functions, i.e showline() are in the generic script; it simply opens the .cmd file and processes each line (processed as Tab-separated commands).
;process individual command lines
For i=1 To n
command = StrTrim(ItemExtract(i,cCmd,@TAB))
The essential part is Execute %command%, which becomes the same as [for example] showline("terminal pager 50000",0)
So, assuming I can replicate the functions like showline() in Python, is there a way I can execute from the .cmd file? Hope this makes sense.