A pstree implementation in Python for MacOS
$ pstree.py
launchd(1)
|- UserEventAgent(35)
|- syslogd(36)
|- uninstalld(38)
|- kextd(39)
|- fseventsd(40)
|- mediaremoted(42)
|- appleeventsd(45)
|- configd(46)
|- iStatMenusDaemon(47)
|- powerd(48)
|- mobileassetd(49)
|- logd(54)
|- airportd(59)
|- warmd(61)
|- mds(62)
|- iconservicesd(67)
|- iconservicesagent(68)
|- diskarbitrationd(70)
|- coreduetd(72)
|- wdhelper(73)
|- opendirectoryd(78)
|- wirelessproxd(79)
|- apsd(81)
|- nbstated(82)
|- launchservicesd(83)
|- usbmuxd(84)
|- securityd(85)
|- locationd(87)
|- DuetHeuristic-BM(89)
|- blued(91)
|- autofsd(92)
|- com.aaa.windscribe.OVPNHelper(95)
|- sh(97)
| |- tcpdump(298)
| `- logger(299)
|- revisiond(98)
...
# cut for saving space