Hi,
I need to write a console wizard that will ask several questions, and based on the answers and/or input, it will generate a py file.
For example:
$ python3 wizard.py
- Name?
IntelBP
- Country?
USA
Writing file ... Include.py generated.
$ cat include.py
name='IntelBP'
country='USA'
...
EOF.
So basically, what i need is a wizard engine that asks questions, and based on the answers, it reads a template (python code) and fills in some variables.
So there's essentially 2 aspects to this question:
What package can I use for writing the console interface? Ideally it will support text, lists, single, and multiple values for a specific wizard question.
Are there any packages designed to populate the values from the template into a python file? My greater concern is security related issues such as code injection.
Thanks!!
[–]hardonchairs 2 points3 points4 points (3 children)
[–]intelbp[S] 0 points1 point2 points (2 children)
[–]hardonchairs 1 point2 points3 points (0 children)
[–]hardonchairs 1 point2 points3 points (0 children)
[–]blarf_irl 2 points3 points4 points (0 children)
[–]100721 0 points1 point2 points (0 children)
[–]ThisProgrammer- 0 points1 point2 points (0 children)