Python cherrypy.__file__() Examples

The following are 6 code examples of cherrypy.__file__(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module cherrypy , or try the search function .
Example #1
Source File: covercp.py    From cherrypy with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
def __init__(self, coverage, root=None):
        self.coverage = coverage
        if root is None:
            # Guess initial depth. Files outside this path will not be
            # reachable from the web interface.
            root = os.path.dirname(cherrypy.__file__)
        self.root = root 
Example #2
Source File: dist-check.py    From cherrypy with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
def test_data_files_installed(data_file_path):
    """
    Ensure that data file paths are available in the
    installed package as expected.
    """
    import cherrypy
    root = os.path.dirname(cherrypy.__file__)
    fn = os.path.join(root, data_file_path)
    assert os.path.exists(fn), fn
    # make sure the file isn't in the local checkout
    assert not os.path.samefile(fn, os.path.join('cherrypy', data_file_path)) 
Example #3
Source File: covercp.py    From opsbro with MIT License 5 votes vote down vote up
def __init__(self, coverage, root=None):
        self.coverage = coverage
        if root is None:
            # Guess initial depth. Files outside this path will not be
            # reachable from the web interface.
            import cherrypy
            root = os.path.dirname(cherrypy.__file__)
        self.root = root 
Example #4
Source File: covercp.py    From bazarr with GNU General Public License v3.0 5 votes vote down vote up
def __init__(self, coverage, root=None):
        self.coverage = coverage
        if root is None:
            # Guess initial depth. Files outside this path will not be
            # reachable from the web interface.
            import cherrypy
            root = os.path.dirname(cherrypy.__file__)
        self.root = root 
Example #5
Source File: covercp.py    From Tautulli with GNU General Public License v3.0 5 votes vote down vote up
def __init__(self, coverage, root=None):
        self.coverage = coverage
        if root is None:
            # Guess initial depth. Files outside this path will not be
            # reachable from the web interface.
            root = os.path.dirname(cherrypy.__file__)
        self.root = root 
Example #6
Source File: covercp.py    From moviegrabber with GNU General Public License v3.0 5 votes vote down vote up
def __init__(self, coverage, root=None):
        self.coverage = coverage
        if root is None:
            # Guess initial depth. Files outside this path will not be
            # reachable from the web interface.
            import cherrypy
            root = os.path.dirname(cherrypy.__file__)
        self.root = root