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.3.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.3-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for rpp-0.3.tar.gz
Algorithm Hash digest
SHA256 b78ef0ca07bc4f6876ccca982e35fec29c0fd6c4bdd12196d86b6045849ec571
MD5 df742832006cad6420aea2055648a21f
BLAKE2b-256 90c8f3b93a067ef0e2b6f9397a9792c1037916deb35ae1a9e172121bb9b0f574

See more details on using hashes here.

File details

Details for the file rpp-0.3-py3-none-any.whl.

File metadata

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

File hashes

Hashes for rpp-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 542df4e237175517fe5577fe321533240a3c7dd6af7b80099aa0d05ac3fc7829
MD5 d85d72c9c468362e2dae6ec6b57d2723
BLAKE2b-256 d86e4f14a77caf89ce43e818b1c9bc71e49dad44fe521542f4422eaf6107b6f5

See more details on using hashes here.

Supported by

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