I am a writing a small plugin to a piece of software that allows people to parse python files and return the output to the program, and to do that, i am allowing users to enter their script. However, they can only enter into a single line text box, so their entered code if formatted as a normal c string, i.e.:
import sys\nprint sys.version\n
When this get's to the program, I have a char string filled with that, however the new lines still exist as the two charachters "\" and "n". Is there a function to convert those to their equvalent charachters, or do i have to write a function to replace for each of those combinations. If so, is there an easy solution to diffrentiating between "\\n" and "\n" in a string.