File: readme.txt

package info (click to toggle)
pythoncard 0.8.2-2
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 8,452 kB
  • sloc: python: 56,787; makefile: 56; sh: 22
file content (160 lines) | stat: -rw-r--r-- 5,087 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
simpleBrowser is not designed to be a full web browser.

The default URL is set to http://diveintopython.org/toc.html, but you can change that in the resource file.

Due to limitations in HtmlWindow and the underlying wxHtmlWindow class, both the HtmlWindow component and the simpleBrowser sample are likely to change a great deal between releases. wxHtmlWindow does not have event bindings, nor can you select the text in the control.

As of wxPython 2.3.2.1, the underlying wxHtmlWindow class does not send a Host: header to web servers, so servers expecting a full HTTP/1.1 request will generally return an error page. This includes almost all Apache servers, including SourceForge. The next version of wxHtmlWindow and wxPython should fix this problem so that the control works with more servers.

I recommend working with HTML files on your local system to avoid HTTP server issues.

The control does not support frames, JavaScript, and many other more advanced HTML features. A list of supported tags is below. Just try it with files on your local system to see what does and doesn't work. I think that it does give us a very simple way to do non-editable styled text with embedded images, tables, etc. and this is the area I would like to explore. It is not going to give us the power of Mozilla or the Internet Explorer ActiveX control.

The underlying wxHtmlWindow control does support embedding other wxWindows classes in HTML and while this is fairly advanced, it is also very powerful. See the wxPython demo.py for an example. We should keep this in mind as the framework progresses.

See the wxWindows/wxPython help file for more info on HTML classes.

---------------------------------------------------------------------------

Tags supported by wxHTML
wxHTML is not full implementation of HTML standard. Instead, it supports
most common tags so that it is possible to display simple HTML documents
with it. (For example it works fine with pages created in Netscape Composer
or generated by tex2rtf).

Following tables list all tags known to wxHTML, together with supported
parameters. A tag has general form of <tagname param_1 param_2 ... param_n>
where param_i is either paramname="paramvalue" or paramname=paramvalue -
these two are equivalent. Unless stated otherwise, wxHTML is
case-insensitive.

Table of common parameter values

We will use these substitutions in tags descriptions:


[alignment]     CENTER
                LEFT
                RIGHT
                JUSTIFY

[v_alignment]   TOP
                BOTTOM
                CENTER

[color]         HTML 4.0-compliant colour specification

[fontsize]      -2
                -1
                +0
                +1
                +2
                +3
                +4
                 1
                 2
                 3
                 4
                 5
                 6
                 7

[pixels]        integer value that represents dimension in pixels

[percent]       i%
                where i is integer

[url]           an URL

[string]        text string

[coords]        c(1),c(2),c(3),...,c(n)
                where c(i) is integer


List of supported tags

A               NAME=[string]
                HREF=[url]
                TARGET=[target window spec]
ADDRESS
AREA            SHAPE=POLY
                SHAPE=CIRCLE
                SHAPE=RECT
                COORDS=[coords]
                HREF=[url]
B
BIG
BLOCKQUOTE
BODY            TEXT=[color]
                LINK=[color]
                BGCOLOR=[color]
BR              ALIGN=[alignment]
CENTER
CITE
CODE
DD
DIV             ALIGN=[alignment]
DL
DT
EM
FONT            COLOR=[color]
                SIZE=[fontsize]
                FACE=[comma-separated list of facenames]
HR              ALIGN=[alignment]
                SIZE=[pixels]
                WIDTH=[percent|pixels]
                NOSHADE
H1
H2
H3
H4
H5
H6
I
IMG             SRC=[url]
                WIDTH=[pixels]
                HEIGHT=[pixels]
                ALIGN=TEXTTOP
                ALIGN=CENTER
                ALIGN=ABSCENTER
                ALIGN=BOTTOM
                USEMAP=[url]
KBD
LI
MAP             NAME=[string]
META            HTTP-EQUIV="Content-Type"
                CONTENT=[string]
OL
P               ALIGN=[alignment]
PRE
SAMP
SMALL
STRIKE
STRONG
TABLE           ALIGN=[alignment]
                WIDTH=[percent|pixels]
                BORDER=[pixels]
                VALIGN=[v_alignment]
                BGCOLOR=[color]
                CELLSPACING=[pixels]
                CELLPADDING=[pixels]
TD              ALIGN=[alignment]
                VALIGN=[v_alignment]
                BGCOLOR=[color]
                WIDTH=[percent|pixels]
                COLSPAN=[pixels]
                ROWSPAN=[pixels]
TH              ALIGN=[alignment]
                VALIGN=[v_alignment]
                BGCOLOR=[color]
                WIDTH=[percent|pixels]
                COLSPAN=[pixels]
                ROWSPAN=[pixels]
TITLE
TR              ALIGN=[alignment]
                VALIGN=[v_alignment]
                BGCOLOR=[color]
TT
U
UL