obi ls command
This commit is contained in:
37
python/obitools3/commands/ls.pyx
Normal file
37
python/obitools3/commands/ls.pyx
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
#cython: language_level=3
|
||||||
|
|
||||||
|
from obitools3.uri.decode import open_uri
|
||||||
|
from obitools3.apps.config import logger
|
||||||
|
from obitools3.dms import DMS
|
||||||
|
from obitools3.apps.optiongroups import addMinimalInputOption
|
||||||
|
|
||||||
|
|
||||||
|
__title__="Print a preview of a DMS, view, column...."
|
||||||
|
|
||||||
|
|
||||||
|
def addOptions(parser):
|
||||||
|
addMinimalInputOption(parser)
|
||||||
|
|
||||||
|
|
||||||
|
def run(config):
|
||||||
|
|
||||||
|
DMS.obi_atexit()
|
||||||
|
|
||||||
|
logger("info", "obi ls")
|
||||||
|
|
||||||
|
# Open the input
|
||||||
|
input = open_uri(config['obi']['inputURI'])
|
||||||
|
if input is None:
|
||||||
|
raise Exception("Could not read input")
|
||||||
|
|
||||||
|
print(repr(input[1]))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Reference in New Issue
Block a user