equal
deleted
inserted
replaced
68 if protocol in ('PYROPSK', 'PYROLOCPSK'): |
68 if protocol in ('PYROPSK', 'PYROLOCPSK'): |
69 return PYROPSKAdapter() |
69 return PYROPSKAdapter() |
70 return _getProtocolAdapter(protocol) |
70 return _getProtocolAdapter(protocol) |
71 |
71 |
72 |
72 |
73 Pyro.protocol.getProtocolAdapter = getProtocolAdapter |
|
74 |
|
75 |
|
76 _processStringURI = Pyro.core.processStringURI |
73 _processStringURI = Pyro.core.processStringURI |
77 |
74 |
78 |
75 |
79 def processStringURI(URI): |
76 def processStringURI(URI): |
80 x = re.match(r'(?P<protocol>PYROLOCPSK)://(?P<hostname>[^\s:]+):?(?P<port>\d+)?/(?P<name>\S*)', URI) |
77 x = re.match(r'(?P<protocol>PYROLOCPSK)://(?P<hostname>[^\s:]+):?(?P<port>\d+)?/(?P<name>\S*)', URI) |
89 name = x.group('name') |
86 name = x.group('name') |
90 return PyroURI(hostname, name, port, protocol) |
87 return PyroURI(hostname, name, port, protocol) |
91 return _processStringURI(URI) |
88 return _processStringURI(URI) |
92 |
89 |
93 |
90 |
94 Pyro.core.processStringURI = processStringURI |
91 def setupPSKAdapter(): |
|
92 """ |
|
93 Add PyroAdapter to the list of available in |
|
94 Pyro adapters and handle new supported protocols |
|
95 |
|
96 This function should be called after |
|
97 reimport of Pyro module to enable PYROS:// again. |
|
98 """ |
|
99 Pyro.protocol.getProtocolAdapter = getProtocolAdapter |
|
100 Pyro.core.processStringURI = processStringURI |