ANNOUNCE textmodel / wxtextview 0.3.3

Hi everyone,


I would like to announce release 0.3.3 of the textmodel / wxtextview-libraries. This release finally solves a difficult problem which was left open after the last big release. The textmodel now uses structure very similar to a b-tree to store the text information. As a result the tree is now always kept in a balanced state and problems from a too large depth are avoided.

What is textmodel / wxtextview? Basically the combination of the two libraries can be used as text editing component for wxpython, similar to wx.TextCtrl. Nice features are
- text can be very long
- text can be styled
- model and view are strictly separated
- the model has no external dependencies and is completely platform independent
- everything is pure python and can be extended and hacked

However, textmodel / wxtextview can also be seen as libraries for constructing text editors. For example if you want to write a drawing program and need a text editor component you should definitively have a look a it.

Wxtextview comes with a couple of demos, most notably a mathematica-like notebook interface for python and a demo showing how to typeset and edit mathematics.

You can download it from [https://pypi.python.org/pypi/textmodel](https://pypi.python.org/pypi/textmodel) and [https://pypi.python.org/pypi/wxtextview](https://pypi.python.org/pypi/textmodel)

Feedback and bug reports are welcome.
Chris

I would like to announce release 0.3.3 of the textmodel /

wxtextview-libraries.

That's pretty interesting. Congratulations! Have a few questions:
How would you say this compares to the wxRichTextCtrl?
What sorts of styles/formatting can be applied?
How does it compare in terms of speed?
Also, what is the purpose of the model? the view? I don't understand why
they are separate parts.
Also, what does "very long" text mean in this case?

Thanks.

Hi Chen,

I would like to announce release 0.3.3 of the textmodel / wxtextview-libraries.

That’s pretty interesting. Congratulations! Have a few questions:
How would you say this compares to the wxRichTextCtrl?

WxRichTextCtrl is written in C++ whereas textmodel is python only.
wxRichTextCtrl is mature textmodel is experimental.
Textmodel can handle tables and math (but you have to implement it yourself) WxRichText can not (I guess)

Have a look at the demos which come with wxtextview. I don’t think this is possible with WxRichText.

What sorts of styles/formatting can be applied?

Currently this is text color, background color, font face, font size, bold, italic, underline.

How does it compare in terms of speed?

Slower of course. But still surprisingly fast.

Also, what is the purpose of the model? the view? I don’t understand why they are separate parts.

MVC is a common technique (Model–view–controller - Wikipedia) and is generally considered to be good style. For the text widget it enables things which are otherwise difficult to reach:

  • synchronously viewing the same text in different windows
  • integrating undo into a document wide undo buffer
  • replacing / modifying the view component

Also, what does “very long” text mean in this case?

With my old pc editing a text with 10000 lines does not feel different, than editing a 10 line text. (But currently there is a noticeable delay for building up the view tree if you have 10000 lines of text.)

Thanks.

Greetings

···

Am Sonntag, 21. Juni 2015 21:21:56 UTC+2 schrieb Che M: