Skip to content

The Donkey Command

In normal configuration, the donkey is a UNIX shell script that is located in the bin directory of your local environment. For example here is a sample path to the donkey command if you are logged into the standard AI Racing account called arl

/home/arl/env/bin
#!/home/dan/env/bin/python3
# EASY-INSTALL-ENTRY-SCRIPT: 'donkeycar','console_scripts','donkey'
__requires__ = 'donkeycar'
import re
import sys
from pkg_resources import load_entry_point

if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
    sys.exit(
        load_entry_point('donkeycar', 'console_scripts', 'donkey')()
    )

This file is automatically generated

This UNIX script is automatically generated and serves as an entry point for the donkeycar package. The console_scripts and donkey parameters provide more information about the entry point, usually used by package management tools like setuptools.

Imports

import re
import sys
from pkg_resources import load_entry_point
  1. re: imports Python's regular expression module.
  2. sys: imports Python's system module to interact with the Python runtime environment.
  3. load_entry_point: imports a function that is responsible for loading the entry point specified.

On the installer for the 4.5.1, this file is not generated.