[Tutor] String switch
g.nius.ck at gmail.com
Tue Oct 11 02:56:21 CEST 2011
Okay, there is a python file called target.py. In the same directory there
is a file named main.py. You are the author of main.py. The code in main.py
will write to target.py. Then the antivirus catches main.py and removes, but
not the modification to target.py. Main.py can not create new files. What
would Main.py have to write to target.py, so that its output is swapped
case. It does not matter how this is achieved. I know that one way is to do
a regex search for every string in the file and then write the text of the
file, with swapcases after strings, back to the file. What is a more elegant
way for this to be achieved.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor