Just prefix the shell as part of your command. I don't have tcsh installed but with zsh:
>>> os.system ("zsh -c 'echo $0'")zsh0
How about:
>>> os.system("tcsh your_own_script")
Or just write the script and add
#!/bin/tcsh
at the beginning of the file and let the OS take care of that.
Just set the shell to use to be tcsh:
tcsh
>>> os.environ['SHELL'] = 'tcsh'>>> os.environ['SHELL']'tcsh'>>> os.system("echo $SHELL")tcsh