~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/externalcommand.py

  • Committer: John Arbash Meinel
  • Date: 2005-12-01 17:36:29 UTC
  • mto: (1185.50.19 bzr-jam-integration)
  • mto: This revision was merged to the branch mainline in revision 1532.
  • Revision ID: john@arbash-meinel.com-20051201173629-aecb08238e0976a2
Removing instances of os.sep

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
    def __init__(self, path):
49
49
        self.path = path
50
50
 
51
 
 
52
51
    def name(self):
53
 
        return self.path.split(os.sep)[-1]
54
 
 
 
52
        return os.path.basename(self.path)
55
53
 
56
54
    def run(self, *args, **kwargs):
57
55
        raise NotImplementedError('should not be called on %r' % self)
58
56
 
59
 
 
60
57
    def run_argv(self, argv):
61
58
        return os.spawnv(os.P_WAIT, self.path, [self.path] + argv)
62
59
 
63
 
 
64
60
    def help(self):
65
61
        m = 'external command from %s\n\n' % self.path
66
62
        pipe = os.popen('%s --help' % self.path)
67
63
        return m + pipe.read()
 
64