Skip to main content

OMG IDL Parser

Project description

idl_parser package example

from idl_parser import parser
parser_ = parser.IDLParser()
idl_str = """
module my_module {
struct Time {
long sec;
long usec;

typedef sequence<double> DoubleSeq;

struct TimedDoubleSeq {
Time tm;
DoubleSeq data;


interface DataGetter {
RETURN_VALUE getData(out TimedDoubleSeq data);


global_module = parser_.load(idl_str)
my_module = global_module.module_by_name('my_module')
dataGetter = my_module.interface_by_name('DataGetter')
print 'DataGetter interface'
for m in dataGetter.methods:
print '- method:'
print ' name:',
print ' returns:',
print ' arguments:'
for a in m.arguments:
print ' name:',
print ' type:', a.type
print ' direction:', a.direction

doubleSeq = my_module.typedef_by_name('DoubleSeq')
print 'typedef %s %s' % (,

timedDoubleSeq = my_module.struct_by_name('TimedDoubleSeq')
print 'TimedDoubleSeq'
for m in timedDoubleSeq.members:
print '- member:'
print ' name:',
print ' type:',

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
idl_parser-0.0.2.tar.gz (8.9 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page