<!--/*SC*/DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"/*EC*/-->
<html><head><title></title><style type="text/css"><!--body{padding:1ex;margin:0px;font-family:sans-serif;font-size:small;}a[href]{color:-moz-hyperlinktext !important;text-decoration:-moz-anchor-decoration;}blockquote{margin:0;border-left:2px solid #144fae;padding-left:1em;}blockquote blockquote{border-color:#006312;}blockquote blockquote blockquote{border-color:#540000;}--></style></head><body><div style="font-family: Arial; font-size: medium;" dir="ltr"><div>I'm new to Tkinter development. We have a very simple markup language that we would like to &quot;syntax color code&quot; using Tkinter's Text widget.</div>
<div>&nbsp;</div>
<div>I'm looking for a simple code snippet, demo app, or high-level narrative description that explains how one might do this from one or more of the following perspectives:</div>
<div>&nbsp;</div>
<div>- initial markup during load</div>
<div>- realtime markup while a user edits content (including clipboard pastes)</div>
<div>- at file save time when one must walk the editted content</div>
<div>&nbsp;</div>
<div>To start the discusson, how might one do this with an example markup language with the following syntax?</div>
<div>&nbsp;</div>
<div>- any word beginning with '*' gets coded blue</div>
<div>- any word beginning with '@' gets coded green</div>
<div>- all other text has no formatting</div>
<div>&nbsp;</div>
<div>Thank you,</div>
<div>Malcolm</div>
<div>&nbsp;</div></div></body></html>