$? in linux gives the exit status of the recently executed command , as i have learnt.
suppose i give a cd command at the terminal and if such a directory or file is not present, echo $? following it gives me 1.
but, when the same is run via a script using os.system("cd.........."),
os.system("echo $?") gives 0.
it might be simple, but I am not able to trace out the reason.. can anyone throw some light on this?