### Run Example Spend P2SH Transaction Script (Shell) Source: https://github.com/petertodd/python-bitcoinlib/blob/master/README.md This command executes an example Python script from the 'examples/' directory that demonstrates how to create a transaction spending a pay-to-script-hash (P2SH) output. It sets the PYTHONPATH environment variable to include the current directory, allowing the script to import the bitcoinlib library. ```shell $ PYTHONPATH=. examples/spend-p2sh-txout.py ``` -------------------------------- ### Install libssl-dev Requirement (Shell) Source: https://github.com/petertodd/python-bitcoinlib/blob/master/README.md This command installs the `libssl-dev` package using apt-get, which is a required dependency for the python-bitcoinlib library. ```shell sudo apt-get install libssl-dev ``` -------------------------------- ### Run Unit Tests with Tox (Shell) Source: https://github.com/petertodd/python-bitcoinlib/blob/master/README.md This command executes the unit tests using Tox, a generic virtualenv management and test command line tool. It runs the tests against multiple Python versions as configured in the project's Tox setup. HTML coverage reports are generated in the `htmlcov/` subdirectory. ```shell ./runtests.sh ``` -------------------------------- ### Run Unit Tests with unittest (Shell) Source: https://github.com/petertodd/python-bitcoinlib/blob/master/README.md This command executes the unit tests located under the `bitcoin/tests` directory using Python's built-in `unittest` module. It discovers and runs all tests within that directory. ```shell python3 -m unittest discover ``` -------------------------------- ### Select Bitcoin Chain Parameters (Python) Source: https://github.com/petertodd/python-bitcoinlib/blob/master/README.md This Python code snippet shows how to select the desired Bitcoin chain (mainnet, testnet, signet, or regtest) using the `bitcoin.SelectParams()` function. The selected chain is stored as a global variable, affecting the behavior of other parts of the library. ```python import bitcoin bitcoin.SelectParams(NAME) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.