コード例 #1
0
ファイル: __init__.py プロジェクト: silkecho/glowing-silk
 def eject(self, udi):
     if util.iscommand("eject"):
         pipe = subprocess.Popen(['eject', self.get_block_device(udi)],
                 stderr=subprocess.PIPE, close_fds=True)
         if pipe.wait() == 0: return True
         else: return pipe.stderr.read()
     else:
         return _("No eject command found.")
コード例 #2
0
ファイル: openwith.py プロジェクト: passy/dotfiles
 def exists(self):
     return util.iscommand(self.command.split()[0])
コード例 #3
0
ファイル: test_util.py プロジェクト: silkecho/glowing-silk
    def test_dir_in_path(self): self.failIf(util.iscommand("X11"))
add(Tiscommand)
コード例 #4
0
ファイル: test_util.py プロジェクト: silkecho/glowing-silk
 def test_symlink(self): self.failUnless(util.iscommand("pidof"))
 def test_dir(self): self.failIf(util.iscommand("/bin"))
コード例 #5
0
ファイル: test_util.py プロジェクト: silkecho/glowing-silk
 def test_dir(self): self.failIf(util.iscommand("/bin"))
 def test_dir_in_path(self): self.failIf(util.iscommand("X11"))
コード例 #6
0
ファイル: test_util.py プロジェクト: silkecho/glowing-silk
 def test_empty(self): self.failIf(util.iscommand(""))
 def test_symlink(self): self.failUnless(util.iscommand("pidof"))
コード例 #7
0
ファイル: test_util.py プロジェクト: silkecho/glowing-silk
 def test_notfull(self): self.failIf(util.iscommand("/bin/zzzzzzzzz"))
 def test_empty(self): self.failIf(util.iscommand(""))
コード例 #8
0
ファイル: test_util.py プロジェクト: silkecho/glowing-silk
 def test_notpartial(self): self.failIf(util.iscommand("zzzzzzzzz"))
 def test_notfull(self): self.failIf(util.iscommand("/bin/zzzzzzzzz"))
コード例 #9
0
ファイル: test_util.py プロジェクト: silkecho/glowing-silk
 def test_isfull(self): self.failUnless(util.iscommand("/bin/ls"))
 def test_notpartial(self): self.failIf(util.iscommand("zzzzzzzzz"))
コード例 #10
0
ファイル: test_util.py プロジェクト: silkecho/glowing-silk
 def test_ispartial(self): self.failUnless(util.iscommand("ls"))
 def test_isfull(self): self.failUnless(util.iscommand("/bin/ls"))