Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id EAC1E200BF7 for ; Sun, 4 Dec 2016 18:39:21 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id E9822160B4C; Sun, 4 Dec 2016 17:39:21 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 1ECC4160B2C for ; Sun, 4 Dec 2016 18:39:18 +0100 (CET) Received: (qmail 14545 invoked by uid 500); 4 Dec 2016 17:39:18 -0000 Mailing-List: contact commits-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@qpid.apache.org Delivered-To: mailing list commits@qpid.apache.org Received: (qmail 14181 invoked by uid 99); 4 Dec 2016 17:39:18 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 Dec 2016 17:39:18 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id BD831F16B3; Sun, 4 Dec 2016 17:39:17 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jross@apache.org To: commits@qpid.apache.org Date: Sun, 04 Dec 2016 17:39:25 -0000 Message-Id: In-Reply-To: <3fb817b316f24b339411ec746545cd28@git.apache.org> References: <3fb817b316f24b339411ec746545cd28@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [09/51] [partial] qpid-site git commit: QPID-7553: Doc snapshots and various other updates archived-at: Sun, 04 Dec 2016 17:39:22 -0000 http://git-wip-us.apache.org/repos/asf/qpid-site/blob/34159cc7/content/releases/qpid-python-master/messaging-api/api/qpid.messaging.address-pysrc.html ---------------------------------------------------------------------- diff --git a/content/releases/qpid-python-master/messaging-api/api/qpid.messaging.address-pysrc.html b/content/releases/qpid-python-master/messaging-api/api/qpid.messaging.address-pysrc.html new file mode 100755 index 0000000..55a1771 --- /dev/null +++ b/content/releases/qpid-python-master/messaging-api/api/qpid.messaging.address-pysrc.html @@ -0,0 +1,308 @@ + + + + + qpid.messaging.address + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Package qpid :: + Package messaging :: + Module address + + + + + +
[frames] | no frames]
+
+

Source Code for Module qpid.messaging.address

+
+  1  # 
+  2  # Licensed to the Apache Software Foundation (ASF) under one 
+  3  # or more contributor license agreements.  See the NOTICE file 
+  4  # distributed with this work for additional information 
+  5  # regarding copyright ownership.  The ASF licenses this file 
+  6  # to you under the Apache License, Version 2.0 (the 
+  7  # "License"); you may not use this file except in compliance 
+  8  # with the License.  You may obtain a copy of the License at 
+  9  # 
+ 10  #   http://www.apache.org/licenses/LICENSE-2.0 
+ 11  # 
+ 12  # Unless required by applicable law or agreed to in writing, 
+ 13  # software distributed under the License is distributed on an 
+ 14  # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
+ 15  # KIND, either express or implied.  See the License for the 
+ 16  # specific language governing permissions and limitations 
+ 17  # under the License. 
+ 18  # 
+ 19  import re 
+ 20  from qpid.lexer import Lexicon, LexError 
+ 21  from qpid.parser import Parser, ParseError 
+ 22   
+ 23  l = Lexicon() 
+ 24   
+ 25  LBRACE = l.define("LBRACE", r"\{") 
+ 26  RBRACE = l.define("RBRACE", r"\}") 
+ 27  LBRACK = l.define("LBRACK", r"\[") 
+ 28  RBRACK = l.define("RBRACK", r"\]") 
+ 29  COLON = l.define("COLON", r":") 
+ 30  SEMI = l.define("SEMI", r";") 
+ 31  SLASH = l.define("SLASH", r"/") 
+ 32  COMMA = l.define("COMMA", r",") 
+ 33  NUMBER = l.define("NUMBER", r'[+-]?[0-9]*\.?[0-9]+') 
+ 34  ID = l.define("ID", r'[a-zA-Z_](?:[a-zA-Z0-9_-]*[a-zA-Z0-9_])?') 
+ 35  STRING = l.define("STRING", r""""(?:[^\\"]|\\.)*"|'(?:[^\\']|\\.)*'""") 
+ 36  ESC = l.define("ESC", r"\\[^ux]|\\x[0-9a-fA-F][0-9a-fA-F]|\\u[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]") 
+ 37  SYM = l.define("SYM", r"[.#*%@$^!+-]") 
+ 38  WSPACE = l.define("WSPACE", r"[ \n\r\t]+") 
+ 39  EOF = l.eof("EOF") 
+ 40   
+ 41  LEXER = l.compile() 
+ 42   
+
43 -def lex(st): +
44 return LEXER.lex(st) +
45 +
46 -def tok2str(tok): +
47 if tok.type is STRING: + 48 return eval(tok.value) + 49 elif tok.type is ESC: + 50 if tok.value[1] == "x": + 51 return eval('"%s"' % tok.value) + 52 elif tok.value[1] == "u": + 53 return eval('u"%s"' % tok.value) + 54 else: + 55 return tok.value[1] + 56 else: + 57 return tok.value +
58 + 59 CONSTANTS = { + 60 "True": True, + 61 "true": True, + 62 "False": False, + 63 "false": False, + 64 "None": None + 65 } + 66 +
67 -def tok2obj(tok): +
68 if tok.type == ID: + 69 return CONSTANTS.get(tok.value, tok.value) + 70 elif tok.type in (STRING, NUMBER): + 71 return eval(tok.value) + 72 else: + 73 return tok.value +
74 +
75 -def toks2str(toks): +
76 if toks: + 77 return "".join(map(tok2str, toks)) + 78 else: + 79 return None +
80 +
81 -class AddressParser(Parser): +
82 +
83 - def __init__(self, tokens): +
84 Parser.__init__(self, [t for t in tokens if t.type is not WSPACE]) +
85 +
86 - def parse(self): +
87 result = self.address() + 88 self.eat(EOF) + 89 return result +
90 +
91 - def address(self): +
92 name = toks2str(self.eat_until(SLASH, SEMI, EOF)) + 93 + 94 if name is None: + 95 raise ParseError(self.next()) + 96 + 97 if self.matches(SLASH): + 98 self.eat(SLASH) + 99 subject = toks2str(self.eat_until(SEMI, EOF)) +100 else: +101 subject = None +102 +103 if self.matches(SEMI): +104 self.eat(SEMI) +105 options = self.map() +106 else: +107 options = None +108 return name, subject, options +
109 +
110 - def map(self): +
111 self.eat(LBRACE) +112 +113 result = {} +114 while True: +115 if self.matches(NUMBER, STRING, ID, LBRACE, LBRACK): +116 n, v = self.keyval() +117 result[n] = v +118 if self.matches(COMMA): +119 self.eat(COMMA) +120 elif self.matches(RBRACE): +121 break +122 else: +123 raise ParseError(self.next(), COMMA, RBRACE) +124 elif self.matches(RBRACE): +125 break +126 else: +127 raise ParseError(self.next(), NUMBER, STRING, ID, LBRACE, LBRACK, +128 RBRACE) +129 +130 self.eat(RBRACE) +131 return result +
132 +
133 - def keyval(self): +
134 key = self.value() +135 self.eat(COLON) +136 val = self.value() +137 return (key, val) +
138 +
139 - def value(self): +
140 if self.matches(NUMBER, STRING, ID): +141 return tok2obj(self.eat()) +142 elif self.matches(LBRACE): +143 return self.map() +144 elif self.matches(LBRACK): +145 return self.list() +146 else: +147 raise ParseError(self.next(), NUMBER, STRING, ID, LBRACE, LBRACK) +
148 +
149 - def list(self): +
150 self.eat(LBRACK) +151 +152 result = [] +153 +154 while True: +155 if self.matches(RBRACK): +156 break +157 else: +158 result.append(self.value()) +159 if self.matches(COMMA): +160 self.eat(COMMA) +161 elif self.matches(RBRACK): +162 break +163 else: +164 raise ParseError(self.next(), COMMA, RBRACK) +165 +166 self.eat(RBRACK) +167 return result +
168 +
169 -def parse(addr): +
170 return AddressParser(lex(addr)).parse() +
171 +172 __all__ = ["parse", "ParseError"] +173 +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + http://git-wip-us.apache.org/repos/asf/qpid-site/blob/34159cc7/content/releases/qpid-python-master/messaging-api/api/qpid.messaging.constants-module.html ---------------------------------------------------------------------- diff --git a/content/releases/qpid-python-master/messaging-api/api/qpid.messaging.constants-module.html b/content/releases/qpid-python-master/messaging-api/api/qpid.messaging.constants-module.html new file mode 100755 index 0000000..c9b64db --- /dev/null +++ b/content/releases/qpid-python-master/messaging-api/api/qpid.messaging.constants-module.html @@ -0,0 +1,185 @@ + + + + + qpid.messaging.constants + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Package qpid :: + Package messaging :: + Module constants + + + + + +
[frames] | no frames]
+
+ +

Module constants

source code

+ + + + + + + + + +
+ Classes
+ Constant +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Variables
+   + + __SELF__ = object() +
+   + + AMQP_PORT = 5672 +
+   + + AMQPS_PORT = 5671 +
+   + + UNLIMITED = UNLIMITED +
+   + + REJECTED = REJECTED +
+   + + RELEASED = RELEASED +
+   + + __package__ = None +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org For additional commands, e-mail: commits-help@qpid.apache.org