Change default_frames_limit trough Text Editor script I want to change the default_frames_limit in the movie clip editor. I found a script in a addon that does exactlie that:
clip = bpy.context.edit_movieclip
clip.tracking.tracks.data.settings.default_frames_limit = 10

But it just works from within the movie clip editor, not from a text editor script.
How could I change this value from a different context?
Its the clip associated with the space.
Similarly to a text in the text editor, an image in the image editor, what is known as the context.clip in the movie clip editor, is the clip assigned to the space.
To the python console:
Loop thru the screens to find a movie clip area and return its active space.
&gt;&gt;&gt; def get_clip():
...     for s in D.screens:
...         for a in s.areas:
...             if a.type == 'CLIP_EDITOR':
...                 return a.spaces.active
...     return None
...     
&gt;&gt;&gt; mc = get_clip()
&gt;&gt;&gt; mc
bpy.data.screens['Default.002']...SpaceClipEditor

The active clip of that space
&gt;&gt;&gt; clip = mc.clip
&gt;&gt;&gt; clip
bpy.data.movieclips['Batman_(1966)_S01E01.mkv']

&gt;&gt;&gt; clip.tracking.tracks.data.settings.default_frames_limit
0