Skip to content

Instantly share code, notes, and snippets.

@a-musing-moose
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save a-musing-moose/9266059 to your computer and use it in GitHub Desktop.
Save a-musing-moose/9266059 to your computer and use it in GitHub Desktop.
How nasty is this?
from oscar_op.ingram import files, converters
class Hmmm(files.FileReader):
rows = {
"R1": type(
'R1Row',
(files.Row, object),
{
"format": [
('first', '2s', converters.StringConverter(2)),
('second', '4s', converters.StringConverter(4)),
('third', '6s', converters.StringConverter(6)),
]
}
),
"R2": type(
'R2Row',
(files.Row, object),
{
"format": [
('first', '2s', converters.StringConverter(2)),
('second', '4s', converters.StringConverter(4)),
('third', '6s', converters.StringConverter(6)),
]
}
),
"R3": type(
'R3Row',
(files.Row, object),
{
"format": [
('first', '2s', converters.StringConverter(2)),
('second', '4s', converters.StringConverter(4)),
('third', '6s', converters.StringConverter(6)),
]
}
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment