The following are examples of py_flow.d. This is a simple script to trace the flow of Python functions. Here it traces the example program, Code/Python/func_abc.py # py_flow.d C TIME(us) FILE -- FUNC 0 3064371810154 site.py -> ? 0 3064371830069 os.py -> ? 0 3064371840076 posixpath.py -> ? 0 3064371840298 stat.py -> ? 0 3064371840319 stat.py <- ? 0 3064371840345 posixpath.py <- ? 0 3064371840364 os.py -> _get_exports_list 0 3064371840510 os.py <- _get_exports_list 0 3064371849994 UserDict.py -> ? 0 3064371850011 UserDict.py -> UserDict 0 3064371850051 UserDict.py <- UserDict 0 3064371850067 UserDict.py -> IterableUserDict 0 3064371850075 UserDict.py <- IterableUserDict 0 3064371850088 UserDict.py -> DictMixin 0 3064371850291 UserDict.py <- DictMixin 0 3064371850300 UserDict.py <- ? 0 3064371850320 os.py -> _Environ 0 3064371850330 os.py <- _Environ 0 3064371850342 os.py -> __init__ 0 3064371850353 UserDict.py -> __init__ 0 3064371850363 UserDict.py <- __init__ 0 3064371850372 os.py <- __init__ 0 3064371850381 os.py -> _exists 0 3064371851137 -> ? 0 3064371851146 <- ? 0 3064371851155 os.py <- _exists 0 3064371851162 os.py -> _exists 0 3064371851186 -> ? 0 3064371851195 <- ? 0 3064371851213 os.py <- _exists 0 3064371851220 os.py -> _exists 0 3064371851242 -> ? 0 3064371851249 <- ? 0 3064371851257 os.py <- _exists 0 3064371851266 os.py -> _exists 0 3064371851286 -> ? 0 3064371851293 <- ? 0 3064371851300 os.py <- _exists 0 3064371851310 os.py -> _exists 0 3064371851330 -> ? 0 3064371851337 <- ? 0 3064371851344 os.py <- _exists 0 3064371851354 os.py -> _exists 0 3064371851374 -> ? 0 3064371851381 <- ? 0 3064371851388 os.py <- _exists 0 3064371851395 os.py -> _exists 0 3064371851415 -> ? 0 3064371851423 <- ? 0 3064371851436 os.py <- _exists 0 3064371851445 os.py -> _exists 0 3064371851465 -> ? 0 3064371851473 <- ? 0 3064371851485 os.py <- _exists 0 3064371851493 os.py -> _exists 0 3064371851514 -> ? 0 3064371851522 <- ? 0 3064371851534 os.py <- _exists 0 3064371851785 copy_reg.py -> ? 0 3064371851996 types.py -> ? 0 3064371852063 types.py -> _C 0 3064371852073 types.py <- _C 0 3064371852108 types.py <- ? 0 3064371852129 copy_reg.py -> pickle 0 3064371852139 copy_reg.py -> constructor 0 3064371852147 copy_reg.py <- constructor 0 3064371852155 copy_reg.py <- pickle 0 3064371852166 copy_reg.py <- ? 0 3064371852179 copy_reg.py -> pickle 0 3064371852188 copy_reg.py -> constructor 0 3064371852196 copy_reg.py <- constructor 0 3064371852204 copy_reg.py <- pickle 0 3064371852212 copy_reg.py -> pickle 0 3064371852221 copy_reg.py -> constructor 0 3064371852229 copy_reg.py <- constructor 0 3064371852236 copy_reg.py <- pickle 0 3064371852244 os.py -> _exists 0 3064371852269 -> ? 0 3064371852277 <- ? 0 3064371852289 os.py <- _exists 0 3064371852297 os.py <- ? 0 3064371852330 site.py -> _Printer 0 3064371852340 site.py <- _Printer 0 3064371852376 site.py -> _Helper 0 3064371852384 site.py <- _Helper 0 3064371852416 site.py -> main 0 3064371852423 site.py -> abs__file__ 0 3064371852434 posixpath.py -> abspath 0 3064371852442 posixpath.py -> isabs 0 3064371852452 posixpath.py <- isabs 0 3064371852460 posixpath.py -> normpath 0 3064371852482 posixpath.py <- normpath 0 3064371852490 posixpath.py <- abspath 0 3064371852504 posixpath.py -> abspath 0 3064371852511 posixpath.py -> isabs 0 3064371852520 posixpath.py <- isabs 0 3064371852527 posixpath.py -> normpath 0 3064371852543 posixpath.py <- normpath 0 3064371852552 posixpath.py <- abspath 0 3064371852560 posixpath.py -> abspath 0 3064371852567 posixpath.py -> isabs 0 3064371852576 posixpath.py <- isabs 0 3064371852583 posixpath.py -> normpath 0 3064371852598 posixpath.py <- normpath 0 3064371852607 posixpath.py <- abspath 0 3064371852615 posixpath.py -> abspath 0 3064371852622 posixpath.py -> isabs 0 3064371852631 posixpath.py <- isabs 0 3064371852638 posixpath.py -> normpath 0 3064371852653 posixpath.py <- normpath 0 3064371852661 posixpath.py <- abspath 0 3064371852674 posixpath.py -> abspath 0 3064371852682 posixpath.py -> isabs 0 3064371852690 posixpath.py <- isabs 0 3064371852697 posixpath.py -> normpath 0 3064371852713 posixpath.py <- normpath 0 3064371852721 posixpath.py <- abspath 0 3064371852741 posixpath.py -> abspath 0 3064371852748 posixpath.py -> isabs 0 3064371852757 posixpath.py <- isabs 0 3064371852764 posixpath.py -> normpath 0 3064371852779 posixpath.py <- normpath 0 3064371852787 posixpath.py <- abspath 0 3064371852804 posixpath.py -> abspath 0 3064371852811 posixpath.py -> isabs 0 3064371852819 posixpath.py <- isabs 0 3064371852826 posixpath.py -> normpath 0 3064371852842 posixpath.py <- normpath 0 3064371852850 posixpath.py <- abspath 0 3064371852858 posixpath.py -> abspath 0 3064371852865 posixpath.py -> isabs 0 3064371852874 posixpath.py <- isabs 0 3064371852881 posixpath.py -> normpath 0 3064371852896 posixpath.py <- normpath 0 3064371852904 posixpath.py <- abspath 0 3064371852915 site.py <- abs__file__ 0 3064371852922 site.py -> removeduppaths 0 3064371852931 site.py -> makepath 0 3064371852940 posixpath.py -> join 0 3064371852948 posixpath.py <- join 0 3064371852955 posixpath.py -> abspath 0 3064371852963 posixpath.py -> isabs 0 3064371852972 posixpath.py <- isabs 0 3064371852980 posixpath.py -> normpath 0 3064371852995 posixpath.py <- normpath 0 3064371853002 posixpath.py <- abspath 0 3064371853010 posixpath.py -> normcase 0 3064371853018 posixpath.py <- normcase 0 3064371853025 site.py <- makepath 0 3064371853065 site.py -> makepath 0 3064371853073 posixpath.py -> join 0 3064371853081 posixpath.py <- join 0 3064371853088 posixpath.py -> abspath 0 3064371853096 posixpath.py -> isabs 0 3064371853104 posixpath.py <- isabs 0 3064371853111 posixpath.py -> normpath 0 3064371853126 posixpath.py <- normpath 0 3064371853134 posixpath.py <- abspath 0 3064371853142 posixpath.py -> normcase 0 3064371853150 posixpath.py <- normcase 0 3064371853157 site.py <- makepath 0 3064371853165 site.py -> makepath 0 3064371853173 posixpath.py -> join 0 3064371853181 posixpath.py <- join 0 3064371853188 posixpath.py -> abspath 0 3064371853195 posixpath.py -> isabs 0 3064371853203 posixpath.py <- isabs 0 3064371853210 posixpath.py -> normpath 0 3064371853226 posixpath.py <- normpath 0 3064371853234 posixpath.py <- abspath 0 3064371853241 posixpath.py -> normcase 0 3064371853249 posixpath.py <- normcase 0 3064371853256 site.py <- makepath 0 3064371853265 site.py -> makepath 0 3064371853272 posixpath.py -> join 0 3064371853280 posixpath.py <- join 0 3064371853287 posixpath.py -> abspath 0 3064371853294 posixpath.py -> isabs 0 3064371853303 posixpath.py <- isabs 0 3064371853310 posixpath.py -> normpath 0 3064371853325 posixpath.py <- normpath 0 3064371853333 posixpath.py <- abspath 0 3064371853341 posixpath.py -> normcase 0 3064371853348 posixpath.py <- normcase 0 3064371853356 site.py <- makepath 0 3064371853364 site.py -> makepath 0 3064371853372 posixpath.py -> join 0 3064371853380 posixpath.py <- join 0 3064371853387 posixpath.py -> abspath 0 3064371853394 posixpath.py -> isabs 0 3064371853402 posixpath.py <- isabs 0 3064371853409 posixpath.py -> normpath 0 3064371853425 posixpath.py <- normpath 0 3064371853433 posixpath.py <- abspath 0 3064371853440 posixpath.py -> normcase 0 3064371853448 posixpath.py <- normcase 0 3064371853455 site.py <- makepath 0 3064371853466 site.py <- removeduppaths 0 3064371853476 posixpath.py -> basename 0 3064371853484 posixpath.py -> split 0 3064371853498 posixpath.py <- split 0 3064371853505 posixpath.py <- basename 0 3064371853513 site.py -> addsitepackages 0 3064371853524 posixpath.py -> join 0 3064371853538 posixpath.py <- join 0 3064371853546 posixpath.py -> join 0 3064371853557 posixpath.py <- join 0 3064371853566 posixpath.py -> isdir 0 3064371853597 stat.py -> S_ISDIR 0 3064371853604 stat.py -> S_IFMT 0 3064371853612 stat.py <- S_IFMT 0 3064371853620 stat.py <- S_ISDIR 0 3064371853627 posixpath.py <- isdir 0 3064371853636 site.py -> addsitedir 0 3064371853643 site.py -> makepath 0 3064371853651 posixpath.py -> join 0 3064371853659 posixpath.py <- join 0 3064371853666 posixpath.py -> abspath 0 3064371853674 posixpath.py -> isabs 0 3064371853683 posixpath.py <- isabs 0 3064371853691 posixpath.py -> normpath 0 3064371853707 posixpath.py <- normpath 0 3064371853715 posixpath.py <- abspath 0 3064371853723 posixpath.py -> normcase 0 3064371853730 posixpath.py <- normcase 0 3064371853738 site.py <- makepath 0 3064371853938 site.py -> addpackage 0 3064371853948 posixpath.py -> join 0 3064371853958 posixpath.py <- join 0 3064371854087 -> ? 0 3064371854098 site.py -> addsitedir 0 3064371854106 site.py -> _init_pathinfo 0 3064371854115 posixpath.py -> isdir 0 3064371854195 posixpath.py <- isdir 0 3064371854204 posixpath.py -> isdir 0 3064371854224 stat.py -> S_ISDIR 0 3064371854232 stat.py -> S_IFMT 0 3064371854240 stat.py <- S_IFMT 0 3064371854247 stat.py <- S_ISDIR 0 3064371854254 posixpath.py <- isdir 0 3064371854262 site.py -> makepath 0 3064371854271 posixpath.py -> join 0 3064371854279 posixpath.py <- join 0 3064371854286 posixpath.py -> abspath 0 3064371854293 posixpath.py -> isabs 0 3064371854302 posixpath.py <- isabs 0 3064371854309 posixpath.py -> normpath 0 3064371854325 posixpath.py <- normpath 0 3064371854333 posixpath.py <- abspath 0 3064371854341 posixpath.py -> normcase 0 3064371854349 posixpath.py <- normcase 0 3064371854356 site.py <- makepath 0 3064371854364 posixpath.py -> isdir 0 3064371854386 stat.py -> S_ISDIR 0 3064371854393 stat.py -> S_IFMT 0 3064371854400 stat.py <- S_IFMT 0 3064371854408 stat.py <- S_ISDIR 0 3064371854415 posixpath.py <- isdir 0 3064371854423 site.py -> makepath 0 3064371854431 posixpath.py -> join 0 3064371854438 posixpath.py <- join 0 3064371854446 posixpath.py -> abspath 0 3064371854453 posixpath.py -> isabs 0 3064371854461 posixpath.py <- isabs 0 3064371854469 posixpath.py -> normpath 0 3064371854485 posixpath.py <- normpath 0 3064371854493 posixpath.py <- abspath 0 3064371854500 posixpath.py -> normcase 0 3064371854508 posixpath.py <- normcase 0 3064371854516 site.py <- makepath 0 3064371854524 posixpath.py -> isdir 0 3064371854556 stat.py -> S_ISDIR 0 3064371854563 stat.py -> S_IFMT 0 3064371854571 stat.py <- S_IFMT 0 3064371854578 stat.py <- S_ISDIR 0 3064371854585 posixpath.py <- isdir 0 3064371854593 site.py -> makepath 0 3064371854601 posixpath.py -> join 0 3064371854609 posixpath.py <- join 0 3064371854616 posixpath.py -> abspath 0 3064371854624 posixpath.py -> isabs 0 3064371854632 posixpath.py <- isabs 0 3064371854639 posixpath.py -> normpath 0 3064371854655 posixpath.py <- normpath 0 3064371854663 posixpath.py <- abspath 0 3064371854671 posixpath.py -> normcase 0 3064371854679 posixpath.py <- normcase 0 3064371854686 site.py <- makepath 0 3064371854694 posixpath.py -> isdir 0 3064371854715 stat.py -> S_ISDIR 0 3064371854722 stat.py -> S_IFMT 0 3064371854730 stat.py <- S_IFMT 0 3064371854737 stat.py <- S_ISDIR 0 3064371854744 posixpath.py <- isdir 0 3064371854752 site.py -> makepath 0 3064371854759 posixpath.py -> join 0 3064371854767 posixpath.py <- join 0 3064371854774 posixpath.py -> abspath 0 3064371854782 posixpath.py -> isabs 0 3064371854790 posixpath.py <- isabs 0 3064371854797 posixpath.py -> normpath 0 3064371854813 posixpath.py <- normpath 0 3064371854821 posixpath.py <- abspath 0 3064371854829 posixpath.py -> normcase 0 3064371854837 posixpath.py <- normcase 0 3064371854844 site.py <- makepath 0 3064371854852 posixpath.py -> isdir 0 3064371854872 stat.py -> S_ISDIR 0 3064371854879 stat.py -> S_IFMT 0 3064371854887 stat.py <- S_IFMT 0 3064371854894 stat.py <- S_ISDIR 0 3064371854901 posixpath.py <- isdir 0 3064371854909 site.py -> makepath 0 3064371854917 posixpath.py -> join 0 3064371854925 posixpath.py <- join 0 3064371854932 posixpath.py -> abspath 0 3064371854939 posixpath.py -> isabs 0 3064371854947 posixpath.py <- isabs 0 3064371854954 posixpath.py -> normpath 0 3064371854970 posixpath.py <- normpath 0 3064371854978 posixpath.py <- abspath 0 3064371854986 posixpath.py -> normcase 0 3064371854994 posixpath.py <- normcase 0 3064371855001 site.py <- makepath 0 3064371855009 site.py <- _init_pathinfo 0 3064371855016 site.py -> makepath 0 3064371855024 posixpath.py -> join 0 3064371855032 posixpath.py <- join 0 3064371855039 posixpath.py -> abspath 0 3064371855047 posixpath.py -> isabs 0 3064371855055 posixpath.py <- isabs 0 3064371855063 posixpath.py -> normpath 0 3064371855078 posixpath.py <- normpath 0 3064371855086 posixpath.py <- abspath 0 3064371855094 posixpath.py -> normcase 0 3064371855101 posixpath.py <- normcase 0 3064371855144 site.py <- makepath 0 3064371855318 site.py -> addpackage 0 3064371855327 posixpath.py -> join 0 3064371855337 posixpath.py <- join 0 3064371855411 site.py -> makepath 0 3064371855420 posixpath.py -> join 0 3064371855430 posixpath.py <- join 0 3064371855437 posixpath.py -> abspath 0 3064371855445 posixpath.py -> isabs 0 3064371855453 posixpath.py <- isabs 0 3064371855460 posixpath.py -> normpath 0 3064371855477 posixpath.py <- normpath 0 3064371855485 posixpath.py <- abspath 0 3064371855493 posixpath.py -> normcase 0 3064371855501 posixpath.py <- normcase 0 3064371855509 site.py <- makepath 0 3064371855517 posixpath.py -> exists 0 3064371855542 posixpath.py <- exists 0 3064371855591 site.py <- addpackage 0 3064371855611 site.py -> addpackage 0 3064371855618 posixpath.py -> join 0 3064371855628 posixpath.py <- join 0 3064371855683 site.py -> makepath 0 3064371855692 posixpath.py -> join 0 3064371855739 posixpath.py <- join 0 3064371855747 posixpath.py -> abspath 0 3064371855754 posixpath.py -> isabs 0 3064371855763 posixpath.py <- isabs 0 3064371855770 posixpath.py -> normpath 0 3064371855788 posixpath.py <- normpath 0 3064371855796 posixpath.py <- abspath 0 3064371855803 posixpath.py -> normcase 0 3064371855811 posixpath.py <- normcase 0 3064371855818 site.py <- makepath 0 3064371855826 posixpath.py -> exists 0 3064371855851 posixpath.py <- exists 0 3064371855880 site.py <- addpackage 0 3064371855892 site.py <- addsitedir 0 3064371855900 <- ? 0 3064371855915 site.py <- addpackage 0 3064371855923 site.py <- addsitedir 0 3064371855932 posixpath.py -> isdir 0 3064371855965 posixpath.py <- isdir 0 3064371855973 site.py <- addsitepackages 0 3064371855982 site.py -> setquit 0 3064371855993 site.py <- setquit 0 3064371856000 site.py -> setcopyright 0 3064371856009 site.py -> __init__ 0 3064371856019 site.py <- __init__ 0 3064371856028 site.py -> __init__ 0 3064371856037 site.py <- __init__ 0 3064371856045 posixpath.py -> dirname 0 3064371856052 posixpath.py -> split 0 3064371856065 posixpath.py <- split 0 3064371856073 posixpath.py <- dirname 0 3064371856085 posixpath.py -> join 0 3064371856096 posixpath.py <- join 0 3064371856104 site.py -> __init__ 0 3064371856113 site.py <- __init__ 0 3064371856121 site.py <- setcopyright 0 3064371856128 site.py -> sethelper 0 3064371856136 site.py <- sethelper 0 3064371856143 site.py -> aliasmbcs 0 3064371856151 site.py <- aliasmbcs 0 3064371856158 site.py -> setencoding 0 3064371856166 site.py <- setencoding 0 3064371856173 site.py -> execsitecustomize 0 3064371871773 site.py <- execsitecustomize 0 3064371871794 site.py <- main 0 3064371871805 site.py <- ? 0 3064371872141 warnings.py -> ? 0 306437187232e linecache.py -> ? 0 3064371872336 linecache.py <- ? 0 3064371872352 warnings.py -> _OptionError 0 3064371872361 warnings.py <- _OptionError 0 3064371872378 warnings.py -> _processoptions 0 3064371872387 warnings.py <- _processoptions 0 3064371872397 warnings.py -> simplefilter 0 3064371872410 warnings.py <- simplefilter 0 3064371872418 warnings.py -> simplefilter 0 3064371872428 warnings.py <- simplefilter 0 3064371872436 warnings.py <- ? 0 3064371886557 __init__.py -> ? 0 3064371891761 codecs.py -> ? 0 3064371891836 codecs.py -> Codec 0 3064371891848 codecs.py <- Codec 0 3064371891864 codecs.py -> StreamWriter 0 3064371891874 codecs.py <- StreamWriter 0 3064371891885 codecs.py -> StreamReader 0 3064371891897 codecs.py <- StreamReader 0 3064371891907 codecs.py -> StreamReaderWriter 0 3064371891918 codecs.py <- StreamReaderWriter 0 3064371891926 codecs.py -> StreamRecoder 0 3064371891938 codecs.py <- StreamRecoder 0 3064371891953 codecs.py <- ? 0 3064371902521 aliases.py -> ? 0 3064371902580 aliases.py <- ? 0 3064371902605 __init__.py -> CodecRegistryError 0 3064371902614 __init__.py <- CodecRegistryError 0 3064371902636 __init__.py <- ? 0 3064371902655 __init__.py -> search_function 0 3064371902666 __init__.py -> normalize_encoding 0 3064371902682 __init__.py <- normalize_encoding 0 3064371902888 ascii.py -> ? 0 3064371902900 ascii.py -> Codec 0 3064371902909 ascii.py <- Codec 0 3064371902922 ascii.py -> StreamWriter 0 3064371902930 ascii.py <- StreamWriter 0 3064371902941 ascii.py -> StreamReader 0 3064371902949 ascii.py <- StreamReader 0 3064371902972 ascii.py -> StreamConverter 0 3064371902981 ascii.py <- StreamConverter 0 3064371902993 ascii.py <- ? 0 3064371903009 ascii.py -> getregentry 0 3064371903018 ascii.py <- getregentry 0 3064371903044 __init__.py <- search_function 0 3064371903414 func_abc.py -> ? 0 3064371933251 func_abc.py -> func_a 0 3064372940696 func_abc.py -> func_b 0 3064373950608 func_abc.py -> func_c 0 3064374960497 func_abc.py <- func_c 0 3064374960512 func_abc.py <- func_b 0 3064374960520 func_abc.py <- func_a 0 3064374960528 func_abc.py <- ? ^C Here we can see that Python has done extensive pre-processing before it runs the Code/Python/func_abc.py program itself. This shows which function is calling which - the output above ends by showing that func_a called func_b which in turn called func_c etc. The TIME(us) column shows time from boot in microseconds. The FILE column shows the file that was being executed. If the output looks strange, check the CPU "C" column - if it changes, then the output is probably shuffled. See Notes/ALLsnoop_notes.txt for details and suggested workarounds. See Notes/ALLflow_notes.txt for important notes about reading flow outputs.