當前位置: 首頁>>代碼示例>>Python>>正文


Python asyncio.SubprocessTransport方法代碼示例

本文整理匯總了Python中asyncio.SubprocessTransport方法的典型用法代碼示例。如果您正苦於以下問題:Python asyncio.SubprocessTransport方法的具體用法?Python asyncio.SubprocessTransport怎麽用?Python asyncio.SubprocessTransport使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在asyncio的用法示例。


在下文中一共展示了asyncio.SubprocessTransport方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: test_subprocess_transport_not_implemented

# 需要導入模塊: import asyncio [as 別名]
# 或者: from asyncio import SubprocessTransport [as 別名]
def test_subprocess_transport_not_implemented(self):
        transport = asyncio.SubprocessTransport()

        self.assertRaises(NotImplementedError, transport.get_pid)
        self.assertRaises(NotImplementedError, transport.get_returncode)
        self.assertRaises(NotImplementedError, transport.get_pipe_transport, 1)
        self.assertRaises(NotImplementedError, transport.send_signal, 1)
        self.assertRaises(NotImplementedError, transport.terminate)
        self.assertRaises(NotImplementedError, transport.kill) 
開發者ID:Microvellum,項目名稱:Fluid-Designer,代碼行數:11,代碼來源:test_transports.py

示例2: __init__

# 需要導入模塊: import asyncio [as 別名]
# 或者: from asyncio import SubprocessTransport [as 別名]
def __init__(self, connected, out_recevied, err_recevied, ended, logfile=None):
        self.connected = connected
        self.out_recevied = out_recevied
        self.err_recevied = err_recevied
        self.ended = ended
        self.logfile = logfile
        self.transport: asyncio.SubprocessTransport
        self.protocol: _Protocol 
開發者ID:kbumsik,項目名稱:VirtScreen,代碼行數:10,代碼來源:process.py

示例3: connection_made

# 需要導入模塊: import asyncio [as 別名]
# 或者: from asyncio import SubprocessTransport [as 別名]
def connection_made(self, transport):
        """Used to signal `asyncio.Protocol` of a successful connection."""
        self._transport = transport
        self._raw_transport = transport
        if isinstance(transport, asyncio.SubprocessTransport):
            self._transport = transport.get_pipe_transport(0) 
開發者ID:neovim,項目名稱:pynvim,代碼行數:8,代碼來源:asyncio.py


注:本文中的asyncio.SubprocessTransport方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。