Home | Trees | Indices | Help |
---|
|
1 ######################################################################## 2 # 3 # File: command_host.py 4 # Author: Stefan Seefeld 5 # Date: 2006-10-24 6 # 7 # Contents: 8 # CommandHost 9 # 10 # Copyright (c) 2006 by CodeSourcery, Inc. All rights reserved. 11 # 12 ######################################################################## 13 14 ######################################################################## 15 # Imports 16 ####################################################################### 17 18 from qm.fields import TextField, SetField 19 from qm.test.classes import local_host 20 import sys, os, os.path 21 22 ######################################################################## 23 # Classes 24 ####################################################################### 2527 """A CommandHost runs an executable through a command. 28 29 The 'command' parameter specifies the command to use, while 30 'command_args' contains a set of arguments to be passed to the 31 command.""" 32 33 34 command = TextField(description="Name of the command" 35 " used to run the executable.") 36 command_args = SetField(TextField(description="Set of arguments" 37 " passed to the command.")) 385141 42 if (relative 43 or (not os.path.isabs(path) 44 and (path.find(os.path.sep) != -1 45 or (os.path.altsep 46 and path.find(os.path.altsep) != -1)))): 47 path = os.path.join(os.curdir, path) 48 arguments = self.command_args + [path] + arguments 49 return local_host.LocalHost.Run(self, self.command, 50 arguments, environment, timeout)
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Fri Dec 23 12:30:48 2011 | http://epydoc.sourceforge.net |