Stefan,
Thank you. The reason that I am using xml.dom.minidom is that I am
restricted to a stock RHEL5 stack. That means 2.4 with nothing added.
(Welcome to US Army IT !!!)
But, I figured out that I need to back up from xml.dom.minidom to
xml.dom and then I can use createCDATASection and get what
I am looking to find the best answer to my question, but in the mean
time I have resorted to monkey patching.
def _write_data_no_quote(writer, data):
"Writes datachars to writer."
data = data.replace("&", "&").replace("<", "<")
data = data.replace(">", ">")
writer.write(data)
mini
I am building a web page (HTML 4.01 Transitional) using
xml.dom.minidom. I have created a
That is a very creative solution! Thank you Scott.
> Or, for faster per-repetition (blending in to your use-case):
>
> import string
> SEP = string.maketrans('abc \t', ' ')
> ...
> parts = 'whatever, abalone dudes'.translate(SEP).split()
> print parts
>
> ['wh', 'tever
On Oct 31, 2:12 pm, Chaim Krause <[EMAIL PROTECTED]> wrote:
> The documentation I am referencing states...
>
> The sep argument may consist of multiple characters (for example, "'1,
> 2, 3'.split(', ')" returns "['1', '2
I have arrived here while attempting to break down a larger problem. I
got to this question when attempting to split a line on any whitespace
character so that I could then add several other characters like ';'
and ':'. Ultimately splitting a line on any char in a union of
string.whitespace and som
The documentation I am referencing states...
The sep argument may consist of multiple characters (for example, "'1,
2, 3'.split(', ')" returns "['1', '2', '3']").
So why doesn't the latter two split on *any* whitespace character, and
is instead looking for the sep string as a whole?
--
http://mai
I am unable to figure out why the first two statements work as I
expect them to and the next two do not. Namely, the first two spit the
sentence into its component words, while the latter two return the
whole sentence entact.
import string
from string import whitespace
mytext = "The quick brown fo