insert a sequence in another sequence.
the sequence is inserted either at the end, or at the position
of the HOOK, if it is found.
The HOOK is considered as being found if
str(elem).find(###ProductionTaskHook$$$)
is true for one of the elements in the insertedTo sequence.
Definition at line 352 of file production_tasks.py.
Referenced by production_tasks.FullCFG.run(), and production_tasks.RunTestEvents.run().
354 '''insert a sequence in another sequence.
356 the sequence is inserted either at the end, or at the position
357 of the HOOK, if it is found.
358 The HOOK is considered as being found if
359 str(elem).find(###ProductionTaskHook$$$)
360 is true for one of the elements in the insertedTo sequence.
362 HOOK =
'###ProductionTaskHook$$$'
364 for index, line
in enumerate(insertedTo):
366 if line.find(HOOK)>-1:
369 if hookIndex
is not None:
370 before = insertedTo[:hookIndex]
371 after = insertedTo[hookIndex:]
372 result = before + toInsert + after
375 insertedTo.extend( toInsert )