当前位置: 首页>>代码示例>>Python>>正文


Python fcntl.I_PUSH属性代码示例

本文整理汇总了Python中fcntl.I_PUSH属性的典型用法代码示例。如果您正苦于以下问题:Python fcntl.I_PUSH属性的具体用法?Python fcntl.I_PUSH怎么用?Python fcntl.I_PUSH使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在fcntl的用法示例。


在下文中一共展示了fcntl.I_PUSH属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: slave_open

# 需要导入模块: import fcntl [as 别名]
# 或者: from fcntl import I_PUSH [as 别名]
def slave_open(tty_name):
    """slave_open(tty_name) -> slave_fd
    Open the pty slave and acquire the controlling terminal, returning
    opened filedescriptor.
    Deprecated, use openpty() instead."""

    result = os.open(tty_name, os.O_RDWR)
    try:
        from fcntl import ioctl, I_PUSH
    except ImportError:
        return result
    try:
        ioctl(result, I_PUSH, "ptem")
        ioctl(result, I_PUSH, "ldterm")
    except IOError:
        pass
    return result 
开发者ID:IronLanguages,项目名称:ironpython2,代码行数:19,代码来源:pty.py

示例2: slave_open

# 需要导入模块: import fcntl [as 别名]
# 或者: from fcntl import I_PUSH [as 别名]
def slave_open(tty_name):
    """slave_open(tty_name) -> slave_fd
    Open the pty slave and acquire the controlling terminal, returning
    opened filedescriptor.
    Deprecated, use openpty() instead."""

    result = os.open(tty_name, os.O_RDWR)
    try:
        from fcntl import ioctl, I_PUSH
    except ImportError:
        return result
    try:
        ioctl(result, I_PUSH, "ptem")
        ioctl(result, I_PUSH, "ldterm")
    except OSError:
        pass
    return result 
开发者ID:Microvellum,项目名称:Fluid-Designer,代码行数:19,代码来源:pty.py


注:本文中的fcntl.I_PUSH属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。