[IronPython] Using ruby module from python.

Pavel Suhotyuk pavel.suhotjuk at gmail.com
Mon Nov 30 11:37:30 CET 2009


Hello.

I want try to use ruby library (soap) in python code.
I found method Use(str) in clr module for load the specified module 
searching all languages in the loaded ScriptRuntime, but don't 
understand how to used it.

I try to call this method in any variants, but nothing happends.

 >>> import clr
 >>> clr.Use('soap/wsdlDriver')
Traceback (most recent call last):
   File "<string>", line 1, in <module>
ValueError: couldn't find module soap/wsdlDriver to use
 >>> clr.Use('soap.wsdlDriver')
Traceback (most recent call last):
   File "<string>", line 1, in <module>
ValueError: couldn't find module soap.wsdlDriver to use
 >>> clr.Use('soap/wsdlDriver.rb')
Traceback (most recent call last):
   File "<string>", line 1, in <module>
ValueError: couldn't find module soap/wsdlDriver.rb to use
 >>> clr.Use(r'''C:\usr\env\IronRuby\lib\ruby\1.8\soap\wsdlDriver.rb''', 
'rb')
<module '?' (built-in)>
 >>> m = 
clr.Use(r'''C:\usr\env\IronRuby\lib\ruby\1.8\soap\wsdlDriver.rb''', 'rb')
 >>> m
<module '?' (built-in)>
 >>> dir(m)
['__builtins__']


Thanks.



More information about the Ironpython-users mailing list