def print_omega_channel(channel, file=sys.stdout):
print('<STR_LIT:{>', file=file)<EOL>try:<EOL><INDENT>params = channel.params.copy()<EOL><DEDENT>except AttributeError:<EOL><INDENT>params = OrderedDict()<EOL><DEDENT>params.setdefault('<STR_LIT>', str(channel))<EOL>params.setdefault('<STR_LIT>', int(params.pop('<STR_LIT>', False)))<EOL>if channel.frametype:<EOL><INDENT>params.setdefault('<STR_LIT>', channel.frametype)<EOL><DEDENT>if channel.sample_rate is not None:<EOL><INDENT>params.setdefault('<STR_LIT>',<EOL>channel.sample_rate.to('<STR_LIT>').value)<EOL><DEDENT>if channel.frequency_range is not None:<EOL><INDENT>low, high = channel.frequency_range.to('<STR_LIT>').value<EOL>params.setdefault('<STR_LIT>', (low, high))<EOL><DEDENT>if '<STR_LIT>' in params or '<STR_LIT>' in params:<EOL><INDENT>qlow = params.pop('<STR_LIT>', '<STR_LIT>')<EOL>qhigh = params.pop('<STR_LIT>', <NUM_LIT:64>)<EOL>params.setdefault('<STR_LIT>', (qlow, qhigh))<EOL><DEDENT>for key in ['<STR_LIT>', '<STR_LIT>']:<EOL><INDENT>if key not in params:<EOL><INDENT>raise KeyError("<STR_LIT>" % (key, str(channel)))<EOL><DEDENT><DEDENT>for key, value in params.items():<EOL><INDENT>key = '<STR_LIT>' % str(key)<EOL>if isinstance(value, tuple):<EOL><INDENT>value = '<STR_LIT>' % '<STR_LIT:U+0020>'.join(map(str, value))<EOL><DEDENT>elif isinstance(value, float) and value.is_integer():<EOL><INDENT>value = int(value)<EOL><DEDENT>elif isinstance(value, str):<EOL><INDENT>value = repr(value)<EOL><DEDENT>print('<STR_LIT>'.format(key, value), file=file)<EOL><DEDENT>print('<STR_LIT:}>', file=file)<EOL>
Print a `Channel` in Omega-pipeline scan format