Did I find the right examples for you? yes no

All Samples(30)  |  Call(30)  |  Derive(0)  |  Import(0)

        def setup():
    import re
    if not os.path.exists(CONFIG_DIR):
        os.mkdir(CONFIG_DIR, 0700)
    if move_old_config() is True:
        return
    conf = {'url': 'https://api.dotcloud.com/'}
    apikey = raw_input('Enter your api key (You can find it at https://www.dotcloud.com/settings): ')
    if not re.match('\w{20}:\w{40}', apikey):
        die('Not a valid api key.')
    conf['apikey'] = apikey
    with open(CONFIG_PATH, 'w') as f:
        json.dump(conf, f, indent=4)
        if not is_windows():
            os.fchmod(f.fileno(), 0600)
    if os.path.exists(CONFIG_KEY):
        os.remove(CONFIG_KEY)
        


src/d/o/DotCloudWin-HEAD/dotcloud/0.4.3/cli/cli.py   DotCloudWin(Download)
def hook_setup(cmd):
    if '-h' in cmd: return
    config.setup()
    sys.exit(0)
 

src/d/o/DotCloudWin-HEAD/dotcloud/0.4.2/cli/cli.py   DotCloudWin(Download)
def hook_setup(cmd):
    if '-h' in cmd: return
    config.setup()
    sys.exit(0)
 

src/d/o/DotCloudWin-HEAD/dotcloud/0.4.0/cli/cli.py   DotCloudWin(Download)
def hook_setup(cmd):
    if '-h' in cmd: return
    config.setup()
    sys.exit(0)
 

src/d/o/DotCloudWin-HEAD/dotcloud/0.3.1/cli/cli.py   DotCloudWin(Download)
def hook_setup(cmd):
    config.setup()
    sys.exit(0)
 
def hook_destroy(cmd):

src/d/o/dotcloud.cli-0.4.8/cli.py   dotcloud.cli(Download)
def hook_setup(cmd):
    if '-h' in cmd: return
    config.setup()
    sys.exit(0)
 

src/d/u/duplicity-HEAD/testing/test_tarfile.py   duplicity(Download)
from duplicity import tarfile
 
config.setup()
 
SAMPLETAR = "testtar.tar"

src/d/u/duplicity-HEAD/testing/tempdirtest.py   duplicity(Download)
from duplicity import tempdir
 
config.setup()
 
class TempDirTest(unittest.TestCase):

src/d/u/duplicity-HEAD/testing/statisticstest.py   duplicity(Download)
from duplicity import path
 
config.setup()
 
class StatsObjTest(unittest.TestCase):

src/d/u/duplicity-HEAD/testing/statictest.py   duplicity(Download)
from duplicity.static import * #@UnusedWildImport
 
config.setup()
 
class D:

src/d/u/duplicity-HEAD/testing/selectiontest.py   duplicity(Download)
from duplicity.lazy import * #@UnusedWildImport
 
config.setup()
 
class MatchingTest(unittest.TestCase):

  1 | 2 | 3  Next