Command line input in Python
Is it possible to run first the program then wait for the input of the user in command line. e.g. Run... Process... Input from the user(in command line form)... Process... It is not at all clear what the OP meant (even after some back-and-forth in the comments), but here are two answers to possible interpretations of the question: For interactive user input (or piped commands or redirected input) Use raw_input in Python 2.x, and input in Python 3. (These are built in, so you don't need to import anything to use them; you just have to use the right one for your version of python.) For example: