Lowest price ever! Learn Generative AI for 48% less!
Get my discount0
How to parse a real python program
I want to know, how to parse Python programs together, I don't see it smart to use impure functions to allow program complete many different tasks like: def Calculator(): ... def Converter(): ... while True: print("I have Calculators and Converters") while True: Ca_Co = input() if Ca_Co == "Calculator": Calculator() break elif Ca_Co == "Converter": Converter() break else: print("What you wanted to do?") continue I would use something like that, but I have 2 questions: Do I need another programming languages like Java to parse Python tasks separated in .py files? What difference is on reading .py files and .txt files?
2 Answers
+ 1
Hi, depends on what you want. Actually python is enough to pars any file containing any sort of text.
So, my question is what you want to see as a result?
0
Nikita Tatiannikov The result would be kind of helper, the helper offers some different tools kind of calculators and text converters. How can those be separated in files and parsed in a program?