Can Readlines() go to next line after a Tab

T

tim

I have a module based app that can load many modules at startup. The modules are text based with a '\t' separating the keyword from the definition. The app reads each module to extract the keywords, but because readlines() must read to the end of the current line to get to the next, the module loading is slow.

Is there a way to have readlines() go to the next line when it finds a tab '\t' instead of a newline '\n'?

Is there a better way to do this?

I know a second file could be made of the keywords only, but I would like to have only one file.

Thanks,
Tim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top