since you are looping over the traces of your stream object (st) you should replace st.write with tr.write. You can do the st.resample and st.trim outside of the loop as this will act on all traces contained in your stream object. So, something like this should work:
In addition to Yanniks comments,
the taking slices out of the string is unsafe (as the position of the
char you are looking for might shift). My earlier example to build the
file name was just simply making use of the complete trace id (SEED
style), just use the respective fields in the trace.stats dictionary if
you don't like this:
st = read("/media/disk-1/OBSPY/cut_SAC/van_dene/2011*", format="SAC")
st.resample(50.0)
EventOriginTime = UTCDateTime("2011-10-23T10:41:19")
st.trim(EventOriginTime, EventOriginTime+360)
for tr in st:
newfname = "%s.%s.SAC" % (tr.stats.station, tr.stats.channel)
tr.write(newfname, format="SAC")
Also, if you have large amounts of data, you should loop over files
instead of reading everything at once (meaning everything is in memory
at the same time!).
import glob
for file in glob.glob("/media/disk-1/OBSPY/cut_SAC/van_dene/2011*"):
st = read(file)
...