PageRenderTime 20ms CodeModel.GetById 17ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/scripts/api/form_create_from_xml.py

https://bitbucket.org/cistrome/cistrome-harvard/
Python | 15 lines | 10 code | 4 blank | 1 comment | 0 complexity | 11f802c6ece296f37ae3a6e9a08146d5 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    data = {}
 9    data[ 'xml_text' ] = open( sys.argv[3] ).read()
10except IndexError:
11    print 'usage: %s key url form_xml_description_file' % os.path.basename( sys.argv[0] )
12    sys.exit( 1 )
13
14
15submit( sys.argv[1], sys.argv[2], data )