Heads Up :
The post you are writing will appear in a public forum. Please ensure all content is appropriate for public consumption. Review the employee guidelines for the community here.
In order to send config commands on the cli you should probably invoke the tcl shell by first sending the tclsh command. Then send the config commands in "" as such:
remote_conn.send("tclsh\r") remote_conn.send('ios_config "int g0/1" "des LINK" "s...
I have a similar script that runs config commands using the tcl shell. Hope this helps.
http://netscriptwiki.com/index.php?title=Configure_switch_interface,_display_before/after_config
https://asciinema.org/a/177308
-Mike