Write code in such a way that the part you want to quickly reference is at the top of the file.
For example, the main() function may depend on func1() and func2(), but that doesn’t mean that the main() function has to be at the bottom of the code.
1 2 3 4 5 6 7 8 9 10 11 12
defmain(): func1() func2()
deffunc1(): pass
deffunc2(): pass
if __name__ == '__main__': main()
Structuring this way is better because now the functionality of the code is more easily apparent without having to scroll down to the bottom of the file.
Just thought I’d share this nugget of knowledge with you all. If you work on linux systems that share a /home directory, that may be NFS-mounted across several other systems, then you can take advantage of this so you don’t have to enter your password every time you ssh between the linux systems.