import subprocess as sp
logs = " ".join(log_files)
proc = sp.Popen([PT_QUERY, "--filter=$event->{{db}} =~ m/{0}/".format(base), logs],
stderr=sp.PIPE, stdout=sp.PIPE)
print proc.stdout.read()
x = ['c', 'd']
['a', 'b', *x] # => ['a', 'b', 'c', 'd']
x = ['c', 'd']
['a', 'b'] + x