Did I find the right examples for you? yes no

All Samples(35)  |  Call(8)  |  Derive(0)  |  Import(27)

src/d/o/dotcloud-0.9.8/dotcloud/ui/cli.py   dotcloud(Download)
from .parser import get_parser
from .version import VERSION
from .config import GlobalConfig, CLIENT_KEY, CLIENT_SECRET
from .colors import Colors
from .utils import pprint_table, pprint_kv
            500: self.error_server,
        }
        self.global_config = GlobalConfig()
        self.setup_auth()
        if username:
            if not re.match('\w{20}:\w{40}', api_key):
                self.die('Invalid API Key')
            config = GlobalConfig()
            config.data = {'apikey': api_key}
            config.save()
                self.die('Username and password do not match. Try again.')
            token['url'] = credential['token_url']
            config = GlobalConfig()
            config.data = {'token': token}
            config.save()
        self.global_config = GlobalConfig()  # reload

src/d/o/dotcloud-cli-HEAD/dotcloud/ui/cli.py   dotcloud-cli(Download)
from .parser import get_parser
from .version import VERSION
from .config import GlobalConfig, CLIENT_KEY, CLIENT_SECRET
from .colors import Colors
from .utils import pprint_table, pprint_kv
            500: self.error_server,
        }
        self.global_config = GlobalConfig()
        self.setup_auth()
        if username:
            if not re.match('\w{20}:\w{40}', api_key):
                self.die('Invalid API Key')
            config = GlobalConfig()
            config.data = {'apikey': api_key}
            config.save()
                self.die('Username and password do not match. Try again.')
            token['url'] = credential['token_url']
            config = GlobalConfig()
            config.data = {'token': token}
            config.save()
        self.global_config = GlobalConfig()  # reload