English-014 DiveintoPython

English-014 DiveintoPython

1.There is an alternative form of string formatting that uses dictionaries instead of tuples of values.
alternative [ɔ:l'tə:nətiv]   adj. 供选择的;选择性的;交替的 n. 二中择一;供替代的选择

2.This name is used as a key in the params dictionary and substitutes the corresponding value, secret, in place of the %(pwd)s marker.
substitute ['sʌbstitju:t, -tu:t]  n. 代替者;代用品 vi. 替代 vt. 代替

3.At this point, it's worth digging a little further into SGMLParser. I've claimed repeatedly (and you've taken it on faith so far) that SGMLParser looks for and calls specific methods for each tag, if they exist. For instance, you just saw the definition of start_pre and end_pre to handle <pre> and </pre>. But how does this happen? Well, it's not magic, it's just good Python coding.
dig [diɡ]   vt. 挖,掘;探究

4.Hey, wait a minute, there's an import statement in this function! That's perfectly legal in Python.

5. It would be helpful if you already knew what an XML document looks like, that it's made up of structured tags to form a hierarchy of elements, and so on. If this doesn't make sense to you, there are many XML tutorials that can explain the basics.
hierarchy ['haiə,rɑ:ki]  n. 层级;等级制度

6.This is, of course, complete gibberish. Well, not complete gibberish. It is syntactically and grammatically correct.
gibberish ['dʒibəriʃ]   n. 快速而不清楚的言语;乱语
syntactic [sin'tæktik]  adj. 句法的;语法的;依据造句法的

7.Actually parsing an XML document is very simple: one line of code. However, before you get to that line of code, you need to take a short detour to talk about packages.
detour ['di:,tuə, di'tuə]  vt. 使…绕道而行 n. 便道;绕道

8.Here you're importing a module (minidom) from a nested package (xml.dom)
nested ['nestid]   adj. 嵌套的,内装的

9.If you ever find yourself writing a large subsystem in Python (or, more likely, when you realize that your small subsystem has grown into a large one), invest some time designing a good package architecture. It's one of the many things Python is good at, so take advantage of it.
take advantage of  利用

10.Since getting the first child node of a node is a useful and common activity, the Node class has a firstChild attribute, which is synonymous with childNodes[0]. (There is also a lastChild attribute, which is synonymous with childNodes[-1].)
synonymous [si'nɔniməs]  adj. 同义的;同义词的;同义突变的
anonymous [ə'nɔniməs] adj. 匿名的,无名的;无个性特征的

11.Drilling down all the way to text
drill down  向地下钻;深度探讨  drill [dril]  n. 钻子;钻孔机;播种机;训练 vi. 钻孔;训练

12.you would need to store the character encoding alongside each piece of text, and make sure to pass it around whenever you passed the text around.
alongside [ə'lɔŋ'said]  adv. 在旁边 prep. 在……旁边

13.Traversing XML documents by stepping through each node can be tedious.
tedious ['ti:dʒəs]  adj. 冗长乏味的;沉闷的
traverse ['trævəs, -və:s, trə'və:s, træ-]  n. 横木;横贯;穿过

14.Searching is actually recursive
recursive [ri'kə:siv]  adj. [计]递归的;循环的

15.XML elements can have one or more attributes, and it is incredibly simple to access them once you have parsed an XML document.

16.This section may be a little confusing, because of some overlapping terminology.
overlapping [,əuvə'læpiŋ]  adj. 重叠;覆盖
terminology [tə:mi'nɔlədʒi]  n. 术语,术语学;用辞

17.When called with a size parameter, it reads that much from the input source and returns that much data; when called again, it picks up where it left off and returns the next chunk of data.
chunk [tʃʌŋk]  n. 大块;矮胖的人或物

18.In case you were wondering how this relates to XML processing, minidom.parse is one such function which can take a file-like object.

19.Well, that all seems like a colossal waste of time. After all, you've already seen that minidom.parse can simply take the filename and do all the opening and closing nonsense automatically.
colossal [kə'lɔsəl]   adj. 巨大的;异常的,非常的

20.Now you pass the file-like object to minidom.parse, which obediently calls the read method of the object and parses the XML data that the read method returns. The fact that this XML data is now coming straight from a web page is completely irrelevant. minidom.parse doesn't know about web pages, and it doesn't care about web pages; it just knows about file-like objects.
obediently [əu'bi:diəntli]  adv. 顺从地;服从地;忠顺地
irrelevant [i'reləvənt]   adj. 不切题的;不相干的
relevant ['reləvənt]  adj. 有关的;中肯的;有重大作用的

你可能感兴趣的:(Web,xml,python,Access,UP)