I get these when playing with the wxPython demo:
$ Traceback (most recent call last):
File "./Main.py", line 447, in OnSelChanged
self.RunDemo(itemText)
File "./Main.py", line 475, in RunDemo
module = __import__(itemText, globals())
File "./FancyText.py", line 3, in ?
from wxPython.lib import fancytext
File "/usr/lib/python2.2/site-packages/wxPython/lib/fancytext.py",
line 32, in ?
import xml.parsers.expat, copy
File "/usr/local/lib/python2.2/xml/parsers/expat.py", line 7, in ?
from pyexpat import *
ImportError: No module named pyexpat
Well the technical answer to my question is obviously "yes". I'm
wondering why pyexpat is really needed just to edit text in memory.
AFAIK XML is suitable for transferring structured data between systems
or archiving data, but not really as a replacement for in-memory
dictionaries, lists, classes, etc...
Any comments/feedback on this?
···
--
Chuck
http://ChuckEsterbrook.com
Chuck Esterbrook wrote:
I get these when playing with the wxPython demo:
$ Traceback (most recent call last):
File "./Main.py", line 447, in OnSelChanged
self.RunDemo(itemText)
File "./Main.py", line 475, in RunDemo
module = __import__(itemText, globals())
File "./FancyText.py", line 3, in ?
from wxPython.lib import fancytext
File "/usr/lib/python2.2/site-packages/wxPython/lib/fancytext.py", line 32, in ?
import xml.parsers.expat, copy
File "/usr/local/lib/python2.2/xml/parsers/expat.py", line 7, in ?
from pyexpat import *
ImportError: No module named pyexpat
Well the technical answer to my question is obviously "yes". I'm wondering why pyexpat is really needed just to edit text in memory. AFAIK XML is suitable for transferring structured data between systems or archiving data, but not really as a replacement for in-memory dictionaries, lists, classes, etc...
Any comments/feedback on this?
I suspect your just confused because you can't see the demo. FancyText takes text formatted with some basic XML parses it (this is wher expat comes in) and renders it (to a bitmap typically). The text that you put in looks like (from the demo):
'<font style="italic" family="swiss" color="red" weight="bold" > 'some
<sup>23</sup> <angle/>text<sub>with <angle/> subscript</sub></font>
some other text'
Not pretty but often convenient. (Since this apparently isn't working for you in the demo you probably can't see what this looks like, but it displays some text in different styles, colors and sizes, some sub and superscipts and an angle symbol.
On the other hand, it may be that I'm just confused about your question, in which case please correct me.
Regards,
-tim
No it looks like my confusion. I could not see the demo as you surmised
and assumed that FancyText was simply for letting users mark things as
bold, italic, etc. Looking through the demo again I see that
functionality is handled by a wxTextCtrl with the right options.
Thanks,
···
On Friday 07 March 2003 04:27 pm, Tim Hochberg wrote:
On the other hand, it may be that I'm just confused about your
question, in which case please correct me.
--
Chuck
http://ChuckEsterbrook.com