On 28 srp, 07:05, Zentrader <[EMAIL PROTECTED]> wrote: > > > [EMAIL PROTECTED] wrote: > > > > NEW TEXT : "Hello world;\nHello:\n\t\t\n\n\n\n\n\nHello2" > > If you are doing all of this to format the output into columns, > Python's print() or write() will do this, and is easier as well. Some > more info on what you want to do will clear things up.
Hi, That is confusing me too, so now I will try explain it more.This is text before "translation": Let me explain you with python code. I want to this "function" act code indentation >>> Short_Text="n=90; if n==90:print 'ok'" Then now I must write that function for detect ";" and ":", and if that function detect ";" then it appends "\n" before ";" but if detect ":" then it appends "\n\t\t\t\t\t\t\t\t" >>> Short_text_after_translation="n=90;\nif n==90:\n\t\t\t\t\t\t\t\tprint 'ok" ...And now when we run this code with exec this must look like: n=90; if n==90: print 'ok' I think this will be enough for help. Regards, Vedran -- http://mail.python.org/mailman/listinfo/python-list