Table of Contents

Configuring OpenSRF Python clients

  1. Install the prerequisites
  2. Test your installation with srfsh.py calling the math_bench test
  3. (Optional): Connect to

Prerequisites

If you try running srfsh.py and dnspython raises an exception concerning dns.resolver.NXDOMAIN you may need to use dnsmasq or the like to provide local DNS resolution for your hostname. This is quite likely to occur if it is localhost, as dnspython does not understand /etc/hosts files. The dnsmasq option that worked for me (using localhost as my hostname) was -A/*/127.0.0.1 – your mileage may vary.

Making requests to Evergreen services

To make a request to an Evergreen service:

  1. Add a link from Open-ILS/src/python/oils to /usr/lib/python2.4/site-packages/. (or the equivalent):
    ln -sf /path/to/Open-ILS/src/python/oils /usr/lib/python2.4/site-packages/.
  2. Add the following section to your .srfsh.xml configuration file:
      <plugins>
        <plugin>
          <module>oils.utils.idl</module>
          <init>IDLParser.parse</init>
        </plugin>
      </plugins>