Skip to main content

Description

RPP is a format used to describe REAPER projects. This package is designed to be RPP parser/emitter and uses PLY as parser framework.

Examples

Import the package:

>>> import rpp

Decode RPP:

>>> r = rpp.loads("""\
<REAPER_PROJECT 0.1 "4.32" 1372525904
  RIPPLE 0
  GROUPOVERRIDE 0 0 0
  AUTOXFADE 1
>
""")
>>> r
Element(tag='REAPER_PROJECT', attrib=['0.1', '4.32', '1372525904'], children=[
    ['RIPPLE', '0'],
    ['GROUPOVERRIDE', '0', '0', '0'],
    ['AUTOXFADE', '1'],
])

Transform elements into RPP:

>>> from rpp import Element
>>> rpp.dumps(
...     Element(tag='REAPER_PROJECT', attrib=['0.1', '4.32', '1372525904'], children=[
...         ['RIPPLE', '0'],
...         ['GROUPOVERRIDE', '0', '0', '0'],
...         ['AUTOXFADE', '1'],
...     ]))
'<REAPER_PROJECT 0.1 4.32 1372525904\n  RIPPLE 0\n  GROUPOVERRIDE 0 0 0\n  AUTOXFADE 1\n>\n'

Element mimics the interface of xml.etree.ElementTree.Element. You can perform quering operations with findall, find, iterfind. Note that attribute and text predicates are not supported.

>>> groupoverride = r.find('.//GROUPOVERRIDE')
>>> groupoverride
['GROUPOVERRIDE', '0', '0', '0']
>>> groupoverride[1:] = ['9', '9', '9']
>>> r
Element(tag='REAPER_PROJECT', attrib=['0.1', '4.32', '1372525904'], children=[
    ['RIPPLE', '0'],
    ['GROUPOVERRIDE', '9', '9', '9'],
    ['AUTOXFADE', '1'],
])

Dependencies

Download files

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

Source Distribution

rpp-0.4.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rpp-0.4-py2.py3-none-any.whl (7.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file rpp-0.4.tar.gz.

File metadata

  • Download URL: rpp-0.4.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for rpp-0.4.tar.gz
Algorithm Hash digest
SHA256 825975eeebeaf9eb35965cd4094cf43673dec2d85606c1dc75970fe8ca4c9ce3
MD5 0a93d533e7a57755527d328ea7f02a2e
BLAKE2b-256 ccac8e37e630ea396273c5ee728fb2a96373bab89ff7048bc7213058016a6eb7

See more details on using hashes here.

File details

Details for the file rpp-0.4-py2.py3-none-any.whl.

File metadata

  • Download URL: rpp-0.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for rpp-0.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 09ca086d497acde4016b318ed571b1bef647a6515cb3432e47ec3f35e3344636
MD5 8af61c3bcbc74fda32ab0ad8dc0e8478
BLAKE2b-256 31b86d0ce0ef40e58cbc83d22d55bde496d25c228cb15fd03159c3ec2efd5ce6

See more details on using hashes here.

Release history Release notifications | RSS feed

0.5

2 files

This release

0.4 This release

2 files

0.3

2 files

0.2

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page