Search code examples
pythonrubyrubypython

calling standard python functions from rubypython


I am trying to use the rubypython gem. Not sure how to call standard python functions like len and set. In the python examples I see len(text3) and set(text3).

How do I call these in rubypython?

Here is the link to rubypython: http://rubypython.rubyforge.org/


Solution

  • RubyPython::PyMainClass has a public instance method builtin() You can use that to call the standard functions.