Well, since Python isn't Perl, when it does something you didn't expect
you can bet it did it for a rational reason <grin>.
Specifically, os.system(some_cmd) returns the exit status of `some_cmd',
and Python always prints the value of a statement that consists in its
entirety of a raw expression. So the line
will always print the exit status of some_cmd, for exactly the same
reason that the line
prints "3". Try, e.g.,
suppress_printing_exit_status = os.system(some_cmd)
That won't print the exit status, & for the same reason that
a = 1+2
won't print "3".
Was that pedantic enough <grin>?
there's-always-a-sensible-method-to-guido's-fine-madness-ly y'rs - tim
Tim Peters Kendall Square Research Corp