Skip to content

Instantly share code, notes, and snippets.

#! /usr/bin/env python3
"""PyFlame Archivematica
Uses pyflame to monitor Archivematica processes (MCP client and server) and
creates SVG files using FlameGraph to visualize the resulting ptrace data.
Usage::
$ sudo ./pyflameam.py
@jrwdunham
jrwdunham / gist:e445eb1b0eba194ef82d583ac6908835
Last active October 4, 2017 19:02
Shows that clamd.ClamdUnixSocket.scan requires Unicode file path arg
"""Gist shows that passing a bytestring file path to
``clamd.ClamdUnixSocket.scan`` raises a UnicodeDecodeError and that decoding
that path to Unicode avoids the error.
Requires clamd be installed: https://github.com/graingert/python-clamd.
Usage. Run::
$ python clamavtest.py