MyCoServer/mycoserver/templates/helpers.py
2014-01-12 01:33:07 +01:00

14 lines
242 B
Python

# -*- coding: utf-8 -*-
import os
import random
import datetime
def random_sequence(length):
return [random.random() for idx in xrange(0, length)]
def relative_path(ctx, abs_path):
return os.path.relpath(abs_path, ctx.req.path)