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


Python EasyProcess.start方法代码示例

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


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

示例1: test_deadlock

# 需要导入模块: from easyprocess import EasyProcess [as 别名]
# 或者: from easyprocess.EasyProcess import start [as 别名]
def test_deadlock():
    d = Display(visible=VISIBLE, size=(600, 400))
    d.start()
    
    p = EasyProcess([python, '-c', 'import Image;Image.new("RGB",(99, 99)).show()'])
    p.start()
    p.sleep(1)
    # hangs with pipes
    p.stop()
    
    d.stop()
开发者ID:Joshuapy,项目名称:EasyProcess,代码行数:13,代码来源:test_deadlock.py

示例2: display

# 需要导入模块: from easyprocess import EasyProcess [as 别名]
# 或者: from easyprocess.EasyProcess import start [as 别名]
 def display(self, zipfilename='', block=True):
     fig = plt.figure()
     self.create(fig, zipfilename)
     if block:
         plt.show()
     else:
         p = EasyProcess([sys.executable,
                          '-m', 'elme.start.plot',
                          self.project.name,
                          '--plot', self.name,
                          '--zipfilename', zipfilename
                          ])
         p.start()
开发者ID:ponty,项目名称:electronic-measurements,代码行数:15,代码来源:project.py

示例3: start

# 需要导入模块: from easyprocess import EasyProcess [as 别名]
# 或者: from easyprocess.EasyProcess import start [as 别名]
    def start(self):
        '''
        start display

        :rtype: self
        '''
        EasyProcess.start(self)

        # https://github.com/ponty/PyVirtualDisplay/issues/2
        self.old_display_var = os.environ[
            'DISPLAY'] if 'DISPLAY' in os.environ else ':0'

        self.redirect_display(True)
        # wait until X server is active
        # TODO: better method
        time.sleep(0.1)
        return self
开发者ID:Cfwang1337,项目名称:thinkful_mvp,代码行数:19,代码来源:abstractdisplay.py

示例4: service

# 需要导入模块: from easyprocess import EasyProcess [as 别名]
# 或者: from easyprocess.EasyProcess import start [as 别名]
def service(request, service_mock):
    port = random.randint(30000, 40000)
    p = EasyProcess('python3.4 src/service.py {}'
        'http://localhost:{}/tests/html1'            
        .format(port, service_mock.port))

    def turn_off():
        print("DOWN")
        p.stop()
        print("STDOUT: " + p.stdout)
        print("STDERROR: " + p.stderr)
        print("CODE: " + str(p.return_code))

    request.addfinalizer(turn_off)
    p.start()
    time.sleep(0.5)
    p.port = port
    return p
开发者ID:mariusavram91,项目名称:pyconie15-workshop-async-py,代码行数:20,代码来源:tests.py

示例5: start

# 需要导入模块: from easyprocess import EasyProcess [as 别名]
# 或者: from easyprocess.EasyProcess import start [as 别名]
    def start(self):
        """
        start display

        :rtype: self
        """
        if self.use_xauth:
            self._setup_xauth()
        EasyProcess.start(self)

        # https://github.com/ponty/PyVirtualDisplay/issues/2
        # https://github.com/ponty/PyVirtualDisplay/issues/14
        self.old_display_var = os.environ.get("DISPLAY", None)

        self.redirect_display(True)
        # wait until X server is active
        # TODO: better method
        time.sleep(0.1)
        return self
开发者ID:ponty,项目名称:PyVirtualDisplay,代码行数:21,代码来源:abstractdisplay.py


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