smartypants is a Python fork of SmartyPants.
To install it:
python -m pip install smartypantsTo use it as a module:
import smartypants
text = '"SmartyPants" is smart, so is <code>smartypants</code> -- a Python port'
print(smartypants.smartypants(text))To use the command-line script smartypants:
echo '"SmartyPants" is smart, so is <code>smartypants</code> -- a Python port' | smartypantsBoth produce:
“SmartyPants” is smart, so is <code>smartypants</code> — a Python port