Skip to content
Jiri Hnidek edited this page Sep 21, 2013 · 5 revisions

Verse Entities (vrsent) is Python module that simplify implementation of Verse clients. This module provides transparent layer between local data and data shared at Verse server. Thus you needn't to care if entities (nodes, tags, etc.) are already shared at Verse server and they have its unique IDs.

This module requires compiled verse module that could be found here:

https://github.com/verse/verse

Versentities module contains several class of basic Verse entities:

These classes could be used for implementation custom subclasees.

If you want to share some data on Verse server, then simple Verse client could look like this:

import vrsent
import time

def main():
    """
    Function with main never ending verse loop
    """
    session = vrsent.VerseSession()
    session.debug_print = True

    node = vrsent.VerseNode(session)
    tg = vrsent.VerseTagGroup(node)
    tag = vrsent.VerseTag(tg)
    tag.value = (10,)

    while(session.state != 'DISCONNECTED'):
        session.callback_update()
        time.sleep(1.0/session.fps)

if __name__ == '__main__':
	main()
Clone this wiki locally