# Path: dgitcore/plugins/common.py
# def plugins_get_mgr():
#     """
#     Get the global plugin manager
#     """
#     global pluginmgr
#     return pluginmgr


import os, sys, json, re, traceback, getpass
import configparser
    from urllib.parse import urlparse
    from urlparse import urlparse
from .plugins.common import plugins_get_mgr
        self.message = "Value should be a valid URL"

    def is_valid(self, value):
        o = urlparse(value)
        return o.scheme in ['http', 'https']


###################################
# Main helper functions...
###################################
def getprofileini():

    if 'DGIT_INI' in os.environ:
        profileini = os.environ['DGIT_INI']
    else:
        homedir = os.path.abspath(os.environ['HOME'])
        profileini = os.path.join(homedir,'.dgit.ini')

    return profileini

def init(globalvars=None, show=False):
    """
    Load profile INI
    """
    global config

    profileini = getprofileini()
    if os.path.exists(profileini):
        config = configparser.ConfigParser()
        config.read(profileini)

# Path: dgitcore/plugins/common.py
# def plugins_get_mgr():
#     """
#     Get the global plugin manager
#     """
#     global pluginmgr
#     return pluginmgr


# Path: dgitcore/config.py
import os, sys, json, re, traceback, getpass
import configparser
    from urllib.parse import urlparse
    from urlparse import urlparse
from .plugins.common import plugins_get_mgr

        self.message = "Value should be a valid URL"

    def is_valid(self, value):
        o = urlparse(value)
        return o.scheme in ['http', 'https']


###################################
# Main helper functions...
###################################
def getprofileini():

    if 'DGIT_INI' in os.environ:
        profileini = os.environ['DGIT_INI']
    else:
        homedir = os.path.abspath(os.environ['HOME'])
        profileini = os.path.join(homedir,'.dgit.ini')

    return profileini

def init(globalvars=None, show=False):
    """
    Load profile INI
    """
    global config

    profileini = getprofileini()
    if os.path.exists(profileini):
        config = configparser.ConfigParser()
        config.read(profileini)

        mgr = plugins_get_mgr()