Python webbrowser.py() Examples

The following are 16 code examples of webbrowser.py(). 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 webbrowser , or try the search function .
Example #1
Source File: pydoc.py    From meddle with MIT License 5 votes vote down vote up
def ispackage(path):
    """Guess whether a path refers to a package directory."""
    if os.path.isdir(path):
        for ext in ('.py', '.pyc', '.pyo'):
            if os.path.isfile(os.path.join(path, '__init__' + ext)):
                return True
    return False 
Example #2
Source File: pydoc.py    From ironpython2 with Apache License 2.0 5 votes vote down vote up
def ispackage(path):
    """Guess whether a path refers to a package directory."""
    if os.path.isdir(path):
        for ext in ('.py', '.pyc', '.pyo'):
            if os.path.isfile(os.path.join(path, '__init__' + ext)):
                return True
    return False 
Example #3
Source File: pydoc.py    From BinderFilter with MIT License 5 votes vote down vote up
def ispackage(path):
    """Guess whether a path refers to a package directory."""
    if os.path.isdir(path):
        for ext in ('.py', '.pyc', '.pyo'):
            if os.path.isfile(os.path.join(path, '__init__' + ext)):
                return True
    return False 
Example #4
Source File: pydoc.py    From Computable with MIT License 5 votes vote down vote up
def ispackage(path):
    """Guess whether a path refers to a package directory."""
    if os.path.isdir(path):
        for ext in ('.py', '.pyc', '.pyo'):
            if os.path.isfile(os.path.join(path, '__init__' + ext)):
                return True
    return False 
Example #5
Source File: pydoc.py    From oss-ftp with MIT License 5 votes vote down vote up
def ispackage(path):
    """Guess whether a path refers to a package directory."""
    if os.path.isdir(path):
        for ext in ('.py', '.pyc', '.pyo'):
            if os.path.isfile(os.path.join(path, '__init__' + ext)):
                return True
    return False 
Example #6
Source File: pydoc.py    From Splunking-Crime with GNU Affero General Public License v3.0 5 votes vote down vote up
def ispackage(path):
    """Guess whether a path refers to a package directory."""
    if os.path.isdir(path):
        for ext in ('.py', '.pyc', '.pyo'):
            if os.path.isfile(os.path.join(path, '__init__' + ext)):
                return True
    return False 
Example #7
Source File: pydoc.py    From medicare-demo with Apache License 2.0 5 votes vote down vote up
def ispackage(path):
    """Guess whether a path refers to a package directory."""
    if os.path.isdir(path):
        for ext in ('.py', '.pyc', '.pyo', '$py.class'):
            if os.path.isfile(os.path.join(path, '__init__' + ext)):
                return True
    return False 
Example #8
Source File: pydoc.py    From CTFCrackTools-V2 with GNU General Public License v3.0 5 votes vote down vote up
def ispackage(path):
    """Guess whether a path refers to a package directory."""
    if os.path.isdir(path):
        for ext in ('.py', '.pyc', '.pyo', '$py.class'):
            if os.path.isfile(os.path.join(path, '__init__' + ext)):
                return True
    return False 
Example #9
Source File: pydoc.py    From CTFCrackTools-V2 with GNU General Public License v3.0 5 votes vote down vote up
def ispackage(path):
    """Guess whether a path refers to a package directory."""
    if os.path.isdir(path):
        for ext in ('.py', '.pyc', '.pyo', '$py.class'):
            if os.path.isfile(os.path.join(path, '__init__' + ext)):
                return True
    return False 
Example #10
Source File: pydoc.py    From RevitBatchProcessor with GNU General Public License v3.0 5 votes vote down vote up
def ispackage(path):
    """Guess whether a path refers to a package directory."""
    if os.path.isdir(path):
        for ext in ('.py', '.pyc', '.pyo'):
            if os.path.isfile(os.path.join(path, '__init__' + ext)):
                return True
    return False 
Example #11
Source File: mypydoc.py    From azure-linux-extensions with Apache License 2.0 5 votes vote down vote up
def ispackage(path):
    """Guess whether a path refers to a package directory."""
    if os.path.isdir(path):
        for ext in ('.py', '.pyc', '.pyo'):
            if os.path.isfile(os.path.join(path, '__init__' + ext)):
                return True
    return False 
Example #12
Source File: pydoc.py    From PokemonGo-DesktopMap with MIT License 5 votes vote down vote up
def ispackage(path):
    """Guess whether a path refers to a package directory."""
    if os.path.isdir(path):
        for ext in ('.py', '.pyc', '.pyo'):
            if os.path.isfile(os.path.join(path, '__init__' + ext)):
                return True
    return False 
Example #13
Source File: pydoc.py    From unity-python with MIT License 5 votes vote down vote up
def ispackage(path):
    """Guess whether a path refers to a package directory."""
    if os.path.isdir(path):
        for ext in ('.py', '.pyc', '.pyo'):
            if os.path.isfile(os.path.join(path, '__init__' + ext)):
                return True
    return False 
Example #14
Source File: pydoc.py    From canape with GNU General Public License v3.0 5 votes vote down vote up
def ispackage(path):
    """Guess whether a path refers to a package directory."""
    if os.path.isdir(path):
        for ext in ('.py', '.pyc', '.pyo'):
            if os.path.isfile(os.path.join(path, '__init__' + ext)):
                return True
    return False 
Example #15
Source File: pydoc.py    From CTFCrackTools with GNU General Public License v3.0 5 votes vote down vote up
def ispackage(path):
    """Guess whether a path refers to a package directory."""
    if os.path.isdir(path):
        for ext in ('.py', '.pyc', '.pyo', '$py.class'):
            if os.path.isfile(os.path.join(path, '__init__' + ext)):
                return True
    return False 
Example #16
Source File: pydoc.py    From CTFCrackTools with GNU General Public License v3.0 5 votes vote down vote up
def ispackage(path):
    """Guess whether a path refers to a package directory."""
    if os.path.isdir(path):
        for ext in ('.py', '.pyc', '.pyo', '$py.class'):
            if os.path.isfile(os.path.join(path, '__init__' + ext)):
                return True
    return False