@@ -0,0 +1,754 @@
+%22%22%22%0AGlobal graph related pypeman functions.%0A%0AOn the long run some commands of pypeman.commands might be candidates%0Ato be moved into this module%0A%22%22%22%0A%0A%0Aimport time%0A%0Afrom pypeman import channels%0Afrom pypeman.errors import PypemanError%0A%0A%0Adef wait_for_loop():%0A    %22%22%22%0A    wait until the loop variable of a pypeman graph%0A    has been initialized%0A%0A    can be used from any thread that's not the main thread%0A    %22%22%22%0A    # TODO: might factor out this function to a helper module%0A    loop = None%0A    for i in range(50, -1, -1):%0A        try:%0A            loop = channels.all_channels%5B0%5D.loop%0A            break%0A        except Exception:%0A            if i == 0:%0A                raise PypemanError(%22couldn't obtain graph's loop%22)%0A        time.sleep(0.1)%0A    return loop%0A

add module for graph related code