Did I find the right examples for you? yes no

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)
Converts an IPP string to an IPP tuple
ipptup('1.2.3.4:5678') == ('1.2.3.4', 5678)

        def ipptup(ipp):
    '''
    Converts an IPP string to an IPP tuple
    ipptup('1.2.3.4:5678') == ('1.2.3.4', 5678)
    '''
    ip, p = ipp.split(':')
    return (ip, int(p))
        


src/p/y/pylehash-HEAD/pylehash/handlers.py   pylehash(Download)
 
from .telex import Telex
from .util import ippstr, ipptup
from .end import End
 
    def handle(self, telex, from_end, switch):
        switch.ipp = ipptup(telex['_to'])
        for handler in default_handlers():
            switch.add_handler(handler)
            handler(telex, from_end, switch)
    def handle(self, telex, from_end, switch):
        for end in telex['.see']:
            switch.ends.add(End(ipptup(end)))
 

src/p/y/pylehash-HEAD/pylehash/__init__.py   pylehash(Download)
 
from twisted.internet import reactor
from .util import ippstr, ipptup
from .telex import Telex
from .switch import Switch