You are asking wrong question, no wonder that the answers do not make any sense.
From your question any reasonable reader (and I completely agree with Greyed) would assume you are after generic way to translate any bash script to Python. Which would be waste of time, because python is higher-level language with many cool concepts making programming in it more productive: your bash-code would very bad (and tricky-hard to debug as CptPicard mentioned) Python code.
Why? because you are working "against the grain". You are doing something you are not supposed to do. Python has rule "there should be one obvious way to do it right". Your's way is not obvious, and so wrong.
Asking right question is half the answer. And your question should be: how a person competent in bash can learn Python quickly? See?
If you understand basic programming concepts, you can learn basic procedural Python over a weekend, OOP will take you more but you don't need it to be productive - you can safely program for a year by just using existing objects (from library) and arrays of dictionaries for your own "objects".
See wiki in my sig for links, books and training tasks.
And you also should really adjust your attitude: if people's answers do not make sense to you, your question does not make sense to them, and it is **your** fault. Nobody owes you anything, volunteers spend own free time to help you. If I spend minutes to write answer for you, it is done in gratitude for people who helped me to learn what I know now, it is not related to you personally in any way. It is easier to ignore a jerk than trying to teach him how to behave.
Read "How to ask questions" in my sig, and apologize to Greyed.
Edit: I am **not** saying that Pro-reason is a jerk. He cannot be, with such nick and I am **not** ignoring him, but trying to answer his question. But I **do** think Pro-reason should readjust his attitude. Even if he is expert translator, learning different programming language is more about learning different paradigms than just mechanically translating syntax of one language into another.
Bookmarks