Control of blender settings via script
bpy.context.scene refers to the current scene, e.g. bpy.data.scenes["Scene"]

Sequence Editor data is stored in the Scene type, and .sequences contains the the top-level strips.

This iterates over all top-level sequences, whereas s refers to a sequence:

for s in bpy.context.scene.sequence_editor.sequences:


If the sequence is of type SOUND:

    if s.type != 'SOUND':


... the following code block is executed:

        s.use_proxy = True
        s.proxy.build_25 = True
        s.proxy.build_50 = False
        s.proxy.build_75 = False
        s.proxy.build_100 = False


A couple sequence properties are set.

Other sequence types:

&gt;&gt;&gt; [item.identifier for item in bpy.types.Sequence.bl_rna.properties['type'].enum_items]

['IMAGE', 'META', 'SCENE', 'MOVIE', 'MOVIECLIP', 'MASK', 'SOUND', 'CROSS', 'ADD', 'SUBTRACT', 'ALPHA_OVER', 'ALPHA_UNDER', 'GAMMA_CROSS', 'MULTIPLY', 'OVER_DROP', 'WIPE', 'GLOW', 'TRANSFORM', 'COLOR', 'SPEED', 'MULTICAM', 'ADJUSTMENT']


You can pick a single sequence and get the type:

&gt;&gt;&gt; type(bpy.context.scene.sequence_editor.sequences[0])
&lt;class 'bpy.types.SceneSequence'&gt;


Check the API docs to find out about the properties and methods:
bpy.types.SceneSequence

.proxy is a subtype, which has several own properties: bpy.types.SequenceProxy

Don't miss to read this:

Blender/Python API Reference Usage: examples of how to use the API reference docs