it seems to me that you could just do this instead os.system("gpg --decrypt-files *.asc | some_(obfuscated?)_way_to_run_the_output_as_a_script") although I am not sure if python comes with something like ruby's irb that would allow you to pipe a script to it to be immediately launched.