Skip to content

Latest commit

 

History

History
85 lines (52 loc) · 2.17 KB

commands.rst

File metadata and controls

85 lines (52 loc) · 2.17 KB

Commands

Jarvis commands are available through the jarvis.commands module.

from jarvis.commands import debug, debug_xml

def main():
   a = "Hello World !"
   debug(a)

Displaying data

These functions are use to display data in the Jarvis panels. All displayed strings are prefixed with a timestamp.

Here is a typical use of this function, given a unittest class called TestMyModule:

import unittest

class TestMyModule(unittest.TestCase):
...
def main():
 filt = "test_"
 suite = unittest.TestLoader().loadTestsFromTestCase(TestMyModule)
 suite = filter(lambda x : str(x).startswith(filt), suite)
 suite = unittest.TestLoader().suiteClass(suite)
 result = unittest.TextTestRunner(verbosity=2).run(suite)
 # Show the test_unit in jarvis
 testunit_result(result)

Using the osg viewer in an external app

Adding files to monitor for change

# Misc replace_this