@Daniel, I have no .bashrc or .profile, just .tcshrc. Perhaps I'm being a bit Homer with his hand stuck in the vending machine here. I could take the path of least resistance and duplicate my .tcshrc as a .bashrc. This would indeed make the problem go away.
@Isaac, interestingly, I don't get the same output:
idewitt@wernicke [1] setenv test val
idewitt@wernicke [2] echo $test
val
idewitt@wernicke [3] sh -C 'echo $test'
sh: echo $test: No such file or directory
idewitt@wernicke [4] sh
sh-3.2$ echo $test
val
sh-3.2$ exit
exit
idewitt@wernicke [5] sh -C
sh-3.2$ echo $test
val
This is a bit beyond me. I would have thought "sh -C 'echo $test'" would yield the same result as "sh -C" followed by "echo $test" in the sub-shell. Also, it is clarifying to note "sh -C 'echo $test'" fails for me but not for you. I'm starting to think my shell behavior is a bit aberrant, suggestive of some self-inflicted wound. I'm not sure where or what though.
As a work around, I've gone and changed my subprocess.py. In it, I discovered the setting of /bin/sh as default is not done my query to the system for either a system or user default but by hardcode so, I set it from /bin/sh to /bin/tcsh. This seems to do the trick in a way that, while subject to need for occasional maintenance, will be at least as enduring as my python install, not pretty but acceptable.
Edited 3 time(s). Last edit at 12/18/2014 05:26PM by iain.