So what is the nature of your problem? 1. That you don't know about regular expressions for detecting keywords in lines? (You might be able to just use the" in" operator on strings.) 2. That file (like object)s have a readline() method for processing a line at a time? 3. That you can't decide among sending HTML snippets or tuples of color and text or strings where the first character of each line implies the color? 4. That you don’t know how to color stuff with classes and CSS?
On Dec 20, 2011 12:20 AM, "himabindu" <binduhima...@gmail.com> wrote: Hi, Iam developing an application in django where I have to color some lines in a file based on some pattern and display the whole log file in web page. Like if a line has "error" word, the line has to be displayed in red color. So far i was just reading the file and sending to html through ajax call and displaying on the browser. Now while displaying i have to differentiate the lines having a perticular keyword by colors, I want to do the coloring at the python side and not at html side. I am reading a file , identifying the line which has the keyword using regular expression, now i have to color that line. It will be very useful for me if anyone could solve my problem. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.