Did I find the right examples for you? yes no

All Samples(18)  |  Call(13)  |  Derive(0)  |  Import(5)

        def find_path(atom, findpath):
    if findpath == '.':
        return atom
    if (findpath[0] != '.'):
        findpath = './' + findpath
    for child in atom.children:
        res = find_path_helper(child, findpath, '.', '.')
        if res:
            return res
        


src/l/o/LocalMedia.bundle-HEAD/Contents/Libraries/Shared/mp4file/atom.py   LocalMedia.bundle(Download)
import struct
 
from atomsearch import find_path, findall_path
 
#log = logging.getLogger("mp4file")
    def find(self, path):
        return find_path(self, path)
 
    def findall(self, path):
        return findall_path(self, path)

src/m/p/mp4file-0.2/mp4file/atom.py   mp4file(Download)
import struct
 
from atomsearch import find_path, findall_path
 
log = logging.getLogger("mp4file")
    def find(self, path):
        return find_path(self, path)
 
    def findall(self, path):
        return findall_path(self, path)

src/s/c/Scanners.bundle-HEAD/Contents/Resources/Common/mp4file/atom.py   Scanners.bundle(Download)
import struct
 
from atomsearch import find_path, findall_path
 
#log = logging.getLogger("mp4file")
    def find(self, path):
        return find_path(self, path)
 
    def findall(self, path):
        return findall_path(self, path)

src/l/o/LocalMedia.bundle-HEAD/Contents/Libraries/Shared/mp4file/atomsearch_test.py   LocalMedia.bundle(Download)
@author: napier
'''
from atomsearch import find_path, findall_path
import unittest
 
    def testFindSelf(self):
        root = find_path(self.mp4, '.')
        self.assertEquals(root.type, 'root')
 
    def testFindStar(self):
        gc1 = find_path(self.mp4, '*/gc')
        self.assertNotEquals(None, gc1)
 
    def testFindGc1(self):
        gc1 = find_path(self.mp4, './child1/gc')
    def testFindGc1(self):
        gc1 = find_path(self.mp4, './child1/gc')
        self.assertNotEqual(None, gc1)
        gc2 = find_path(self.mp4, './child1/grandchild')
        self.assertNotEqual(None, gc2)

src/m/p/mp4file-0.2/mp4file/atomsearch_test.py   mp4file(Download)
@author: napier
'''
from atomsearch import find_path, findall_path
import unittest
 
    def testFindSelf(self):
        root = find_path(self.mp4, '.')
        self.assertEquals(root.type, 'root')
 
    def testFindStar(self):
        gc1 = find_path(self.mp4, '*/gc')
        self.assertNotEquals(None, gc1)
 
    def testFindGc1(self):
        gc1 = find_path(self.mp4, './child1/gc')
    def testFindGc1(self):
        gc1 = find_path(self.mp4, './child1/gc')
        self.assertNotEqual(None, gc1)
        gc2 = find_path(self.mp4, './child1/grandchild')
        self.assertNotEqual(None, gc2)