lib Documentation

backup

php

Provides a simple interface to legacy PHP code, such as fuzzymatch.

class inpho.lib.php.PHP(prefix='', postfix='')[source]

This class provides a simple interface to PHP programming.

get(code)[source]

Given a code block that emits json, invoke the code and return the result as a native Python dictionary.

get_one(code)[source]

Given a code block that emits multiple json values (one per line), yield the next value.

get_raw(code)[source]

Given a code block, invoke the code and return the raw result.

url

class inpho.lib.url.URLopener(*args, **kwargs)[source]

URLopener with user-agent spoofing to test journal URLs.

version = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0.1)Gecko/20100101 Firefox/4.0.1'