On Tue, Jan 6, 2009 at 7:34 PM, David wrote:
> Hi,
> This works fine if I don't use the -f option;
> #!/usr/bin/python
> from subprocess import call
> from termcolor import colored
>
> def slog():
>sudo = "sudo"
>tail = "tail"
>sfile = "/var/log/messages"
>print colored("", "blue")
On Tue, Jan 06, 2009, David wrote:
>>
>> Now if I do this to all the functions;
>> def slog():
>> sudo = "sudo"
>> tail = "tail"
>> targ = "-f" # output appended data as the file grows
>> sfile = "/var/log/messages"
>> print colored("", "blue")
>> call([sudo, tail, sfile])
>
Now if I do this to all the functions;
def slog():
sudo = "sudo"
tail = "tail"
targ = "-f" # output appended data as the file grows
sfile = "/var/log/messages"
print colored("", "blue")
call([sudo, tail, sfile])
Only the first function will print to the screen.
thanks in
Hi,
This works fine if I don't use the -f option;
#!/usr/bin/python
from subprocess import call
from termcolor import colored
def slog():
sudo = "sudo"
tail = "tail"
sfile = "/var/log/messages"
print colored("", "blue")
call([sudo, tail, sfile])
def alog():
sudo = "sudo"