Exemple #1
0
def startGlowScript():
    python = local['python']
    dev_appserver = local[
        '/Users/jonschull-MBPR/Downloads/google-cloud-sdk/bin/dev_appserver.py']
    GSappYAML = local['/Users/jonschull-MBPR/glowscript/app.yaml']
    python[dev_appserver, GSappYAML] & NOHUP(stdout='/dev/null')
    sleep(2)  #give the server time to start up
Exemple #2
0
 def test_nohup(self):
     with self._connect() as rem:
         sleep = rem["sleep"]
         sleep["5.793817"] & NOHUP(stdout=None, append=False)
         time.sleep(.5)
         print(rem["ps"]("aux"))
         assert list(rem.pgrep("5.793817"))
         time.sleep(6)
         assert not list(rem.pgrep("5.793817"))
Exemple #3
0
    def test_redir(self):
        delete("nohup_new.out")
        output = echo["This is output"]

        output & NOHUP(stdout="nohup_new.out")
        time.sleep(0.2)
        assert self.read_file("nohup_new.out") == "This is output\n"
        delete("nohup_new.out")

        (output > "nohup_new.out") & NOHUP
        time.sleep(0.2)
        assert self.read_file("nohup_new.out") == "This is output\n"
        delete("nohup_new.out")

        output & NOHUP
        time.sleep(0.2)
        assert self.read_file("nohup.out") == "This is output\n"
        delete("nohup.out")
Exemple #4
0
    def test_redir(self):
        delete('nohup_new.out')
        output = echo['This is output']

        output & NOHUP(stdout = 'nohup_new.out')
        time.sleep(.2)
        assert self.read_file('nohup_new.out') == 'This is output\n'
        delete('nohup_new.out')

        (output > 'nohup_new.out') & NOHUP
        time.sleep(.2)
        assert self.read_file('nohup_new.out') == 'This is output\n'
        delete('nohup_new.out')

        output & NOHUP
        time.sleep(.2)
        assert self.read_file('nohup.out') == 'This is output\n'
        delete('nohup.out')
Exemple #5
0
def webServer(targetName):
    from plumbum import local, NOHUP, BG
    python3 = local['python3']
    dirName = targetName.replace('.py', '')
    python3['-m', 'http.server', '8081'] & NOHUP(stdout='/dev/null')
    msg('server at 8081')