Altera_Forum
Honored Contributor
10 years agonios2-terminal command line
Hi
Im trying to issue a set of commands to my nios using the jtag-uart. I can open up the command shell, type nios2-terminal, issue my command and then type ctrl-c and close the terminal. I can repeat this as often as needed. Now, Im trying to automate it using python: from winpexpect import winspawn import time SC=winspawn("C:/altera/13.0/nios2eds/Nios_II_Command_Shell.bat") SC.expect('$') SC.sendline('nios2-terminal') time.sleep(5) SC.sendline('deadbeef;') this works fine. But my problem comes when i try to send the crtl-c Winpexpect does have a send control function, so when i send SC.sendcontrol('c') the nios2-terminal just doesnt stop. It will stay connected and then not allow other connections to be made So, my question is : Is there a command line equivalent to "nios2-terminal deadbeef ctrl-c" such that i can just send the line and have nios2-terminal automatically close its session so i can open others later? thanks!