Looping text in Python with directional control
When I try it, it doesn't really work unless I add stdout.flush() after each stdout.write().

The padding isn't controllable, as neither set_text() nor update_loop() accepts a padding parameter.

In my opinion, it should print the original text before performing the first shift.

Global variables are bad.  In this case, I'd eliminate them altogether by simplifying the code.  Take advantage of itertools.cycle() and Python's support for negative indexes.  I wouldn't bother with converting the string to a list and back to a string again.

DIRECTION_LEFT_TO_RIGHT is a bit verbose.  I suggest SCROLL_RIGHT instead.  "Frequency" sounds like it should go faster as the number increases: 10 Hz is faster than 1 Hz.  I suggest period as the name for the delay.

from itertools import cycle
from sys import stdout
from time import sleep

SCROLL_RIGHT = -1
SCROLL_LEFT = +1

def animate_text(text, scroll=SCROLL_RIGHT, period=0.5, padding=5):
    text += ' ' * padding
    for offset in cycle(xrange(0, scroll * len(text), scroll)):
        stdout.write('\r' + text[offset:] + text[:offset])
        stdout.flush()
        sleep(period)

animate_text('Beautiful Lie')