PYM4/pym4 is a GNU m4 1.4 compatible macro processor written in pure Python: no compiler, no m4.exe, no dependencies. Although it is functionally the same as GNU m4 1.4, the main purpose of developing pym4 was to preprocess M4 Circuit Macros on a PC that does not have GNU m4 installed, typically due to IT-related security policies, to produce a .pic output file from the .m4 or .m4cm input file.

The .pic output files can then be compiled into a .tex output file, using GNU PIC, e.g. gpic -t, or by making use of dpic, e.g. dip -p or dip -g, or using P&P-PIC/pppic – as described on here.