Sep-21-2022, 01:47 AM
yeah, the file will have the same kind of thing as you see between quotes of an f-string literal but it would not be a literal. i cannot remember where i read this but i read that there was a way to pass such a string to some method called format that would format it in the specified/given context. it have looked at the description of the builtin format() but it does not seem to have a way to execute a snippet (stuff between {}) that is executable code. so i can put a var name in there but not an expression.
i can do what i want in Bash using the eval command. i just need to put '$' in front of the { for each snippet and make it run in a way that it captures the evaluation into a string. i have done the bash thing before.
but i now want to do this in Python.
i can do what i want in Bash using the eval command. i just need to put '$' in front of the { for each snippet and make it run in a way that it captures the evaluation into a string. i have done the bash thing before.
but i now want to do this in Python.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.