PageRenderTime 7ms CodeModel.GetById 1ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/scripts/api/history_create_history.py

https://bitbucket.org/cistrome/cistrome-harvard/
Python | 18 lines | 14 code | 3 blank | 1 comment | 0 complexity | d610f490d396c2ca11c05cf05fb0301f MD5 | raw file
 1#!/usr/bin/env python
 2
 3import os, sys
 4sys.path.insert( 0, os.path.dirname( __file__ ) )
 5from common import submit
 6
 7try:
 8    assert sys.argv[2]
 9except IndexError:
10    print 'usage: %s key url [name] ' % os.path.basename( sys.argv[0] )
11    sys.exit( 1 )
12try:
13    data = {}
14    data[ 'name' ] = sys.argv[3]
15except IndexError:
16    pass
17
18submit( sys.argv[1], sys.argv[2], data )