Module: RubyPythonBridge
- Defined in:
- ext/rubypython_bridge/rubypython_bridge.c
Defined Under Namespace
Classes: BlankObject, RubyPyClass, RubyPyFunction, RubyPyInstance, RubyPyModule, RubyPyObject
Class Method Summary collapse
-
.import(mname) ⇒ Object
call - seq: import(modname).
-
.start ⇒ Object
call - seq: start().
-
.stop ⇒ Object
call - seq: stop().
Class Method Details
.import(mname) ⇒ Object
call - seq: import(modname)
Imports the python module modname using the interpreter and returns a ruby wrapper
62 63 64 65 |
# File 'ext/rubypython_bridge/rubypython_bridge.c', line 62 static VALUE rp_import(VALUE self, VALUE mname) { return rb_class_new_instance(1,&mname, cRubyPyModule); } |
.start ⇒ Object
call - seq: start()
Starts the python interpreter
73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'ext/rubypython_bridge/rubypython_bridge.c', line 73 VALUE rp_start(VALUE self) { if(Py_IsInitialized()) { return Qfalse; } Py_Initialize(); return Qtrue; } |
.stop ⇒ Object
call - seq: stop()
Stop the python interpreter
91 92 93 94 95 96 97 98 99 100 101 |
# File 'ext/rubypython_bridge/rubypython_bridge.c', line 91 VALUE rp_stop(VALUE self) { if(Py_IsInitialized()) { Py_Finalize(); return Qtrue; } return Qfalse; } |