Great news Peter,
This is how Galaxy seems to do it:
command = "samtools sort %s %s" % ( file_name, tmp_sorted_dataset_file_name_prefix )
proc = subprocess.Popen( args=command, shell=True, cwd=tmp_dir, stderr=open( stderr_name, 'wb' ) )
https://github.com/galaxyproject/galaxy/blob/dev/lib/galaxy/datatypes/binary.py#L278
Since galaxy ships with a builtin pysam (0.8.3) wheel, I think it would be handier to use pysam for sorting (once updated to the latest HTSlib).
Pysam now also has all samtools c functions directly builtin:
pysam.index( "arg1", "arg2" ) is the equivalent of the command line argument samtools index "arg1" "arg2"
...
Youri