I'd need a bit more information in order to answer this question. I wrote a matlab script that generates .inp files (python script) for a beam element structure. The analysis was for natural frequency. It is difficult to make the .inp file by coding a python script IF the geometry is somewhat complicated. So the question is, are you trying to make many different iterations of a design? Are you just making one model?