mirror of https://github.com/pvnis/srsRAN_4G.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
918 B
Python
39 lines
918 B
Python
11 years ago
|
#!/usr/bin/env python
|
||
|
|
||
|
from module import Module
|
||
|
from xml2aloe import MakeModule
|
||
|
import sys, os, getopt
|
||
|
|
||
|
argv = sys.argv
|
||
|
input_file = None
|
||
|
output_dir = None
|
||
|
try:
|
||
|
opts, args = getopt.getopt(argv,"hi:o:",["input_file=","output_dir="])
|
||
|
except getopt.GetoptError:
|
||
|
print argv[0] + ' -i <input_file> -o <output_dir>'
|
||
|
sys.exit(2)
|
||
|
for opt, arg in opts:
|
||
|
if opt == '-h':
|
||
|
print argv[0] + ' -i <input_file> -o <output_dir>'
|
||
|
sys.exit()
|
||
|
elif opt in ("-i", "--input_file"):
|
||
|
input_file = arg
|
||
|
elif opt in ("-o", "--output_dir"):
|
||
|
output_dir = arg
|
||
|
|
||
|
if input_file == None or output_dir == None:
|
||
|
print argv[0] + ' -i <input_file> -o <output_dir>'
|
||
|
sys.exit(2)
|
||
|
|
||
|
filename=os.path.basename(input_file).split('.')[0]
|
||
|
|
||
|
print filename + '\n'
|
||
|
print input_file + '\n'
|
||
|
print output_dir + '\n'
|
||
|
#m = Module("binsource")
|
||
|
|
||
|
#m.readHeader(input_file)
|
||
|
#MakeModule(m,output_dir)
|
||
|
#print m.toString()
|
||
|
|