So, I've written some fairly big code for cent OS 7.1. The code essentially makes use of different command line tools by parsing the text output and shoving it in a database... pretty straight forward.
Now I'm tasked with making this code run on Ubuntu, cent OS 6, and potentially other flavors. The code of concern is python 2.7. What methodologies exist for getting this done?
The method that is staring me in the face is obvious, just switch the commands your running and how you parse them based on what OS your running. But I'm really scared this isn't a good way and may become unmanageable. I've never done something like this, getting code to run on multiple OSs and I'm really hoping someone with experience with this can help me with overall approach to this, what must be a typical, programming challenge.
Thanks in advance