Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

from elementtree import ElementTree as et 

import os 

 

ROOT_PATH = '' 

 

def get_js_files(): 

    """Returns a list of all the javascript files listed in  

    media/js_includes.xml""" 

    files = [] 

    path = os.path.dirname(os.path.abspath(__file__)) 

    tree = et.parse(path + '/../media/js_includes.xml') 

    for f in tree.findall('file'): 

        files.append(ROOT_PATH + f.get('path')) 

    return files 

 

def get_js_test_files(): 

    """Returns a list of all the javascript test files listed in  

    media/js_includes.xml""" 

    files = [] 

    path = os.path.dirname(os.path.abspath(__file__)) 

    tree = et.parse(path + '/../media/js_includes.xml') 

    for f in tree.findall('test'): 

        files.append(ROOT_PATH + f.get('path')) 

    return files 

 

def get_css_files(): 

    """Returns a list of all css files listed in  

    media/css_includes.xml""" 

    files = [] 

    path = os.path.dirname(os.path.abspath(__file__)) 

    tree = et.parse(path + '/../media/css_includes.xml') 

    for f in tree.findall('file'): 

        files.append(ROOT_PATH + f.get('path')) 

    return files