0

Is there any python module which is a parser for user input data and executes user commands and processes Python syntax? For example:

user>for i in range(3):
...    doSomething()

Above line will execute doSomething() method 3 times. I know there are many packages with parsers but I haven't seen any with possibility to execute Python syntax.

VIPPER
  • 326
  • 4
  • 24

1 Answers1

0

I can't tell what exactly you're looking for. It sounds like you're asking for a Python shell, in which case you should run python at the command prompt. On the other hand, if you're looking for a command line argument parsing library, try argparse from here.

TimD1
  • 982
  • 15
  • 26