ControlList and displaying text with tabs
#1
i've searched but cannot find the answers for these...


i'm seeing an issue where i read a text file that has lines with tabs (\t).

example line...
thu feb 02 09:44:10 2006 gms-5 pattern


but when i read in the text and display it using controllist it shows like this on screen...

thu feb 02 09:44:10 2006gms-5 pattern



also...
how can i insert a new line, as the first line (not the last) of a text file... using append (not read in entire file and rewrite it)? i've tried f.seek(0) but that does not place me at the first line?



I'm not an expert but I play one at work.
Reply
#2
in a fixed width font a tab will insert >= 0 whitespace to get to the next tab column. i dont know how xbmc treats tabs but you might just be at the zero mark.

i dont think there is a prepend. really you should just read in the file and output it again (you can read in a bit at a time to make it memory efficient).
Reply
#3
xbmc ignores tabs most probably (ie if the font doesn't have a glyph for that character, it'll not output anything).

replace them with spaces is the best way to deal with it imo.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#4
in that case strings have a expandtabs([ tabsize]) method though there may be issues with proporional fonts.
Reply

Logout Mark Read Team Forum Stats Members Help
ControlList and displaying text with tabs0