<commit_before>import xmlrpclib
import socket
import time
import sys
try:
    from xml.parsers.expat import ExpatError
except ImportError:
    ExpatError = None   # Support for Jython 2.2

from robot.errors import RemoteError


class Remote:
    
    ROBOT_LIBRARY_SCOPE = 'TEST SUITE'

    def __init__(self, uri='http://localhost:8270'):
        if '://' not in uri:
            uri = 'http://' + uri
        if uri.startswith('rmi://'):
            self._client = RmiRemoteClient(uri)
        else:
            self._client = XmlRpcRemoteClient(uri)
<commit_msg>Add support for RF 2.0.2 and ealier back (I thought supporting older versions gets more complicated but it didn't)<commit_after>import xmlrpclib
import socket
import time
import sys
try:
    from xml.parsers.expat import ExpatError
except ImportError:
    ExpatError = None   # Support for Jython 2.2(.x)

try:
    from robot.errors import RemoteError
except ImportError:
    # Support for Robot Framework 2.0.2 and earlier
    def RemoteError(message, traceback):
        print '*INFO*', traceback
        raise AssertionError(message)


class Remote:
    
    ROBOT_LIBRARY_SCOPE = 'TEST SUITE'

    def __init__(self, uri='http://localhost:8270'):
        if '://' not in uri:
            uri = 'http://' + uri
        if uri.startswith('rmi://'):
            self._client = RmiRemoteClient(uri)
        else:
            self._client = XmlRpcRemoteClient(uri)

{'fraction_non_alphanumeric': 0.09657102869139259, 'fraction_numerical': 0.012596221133659902, 'mean_word_length': 2.7142857142857144, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7112720', 'n_tokens_mistral': 458, 'n_tokens_neox': 434, 'n_words': 130}