Commit 4b2484f8 authored by Marc Duez's avatar Marc Duez
Browse files : simple xml-rpc server to handle custom_fuse request

parent 7658c786
from SimpleXMLRPCServer import SimpleXMLRPCServer, SimpleXMLRPCRequestHandler
from subprocess import *
def fuse(cmd, output_dir, filename):
import time, datetime, sys, os.path, random
from subprocess import Popen, PIPE, STDOUT, os
fuse_log_file = open(output_dir+'/'+filename+'.fuse.log', 'w')
output_file = output_dir+'/'+filename+'.fused'
p = Popen(cmd, shell=True, stdin=PIPE, stdout=fuse_log_file, stderr=STDOUT, close_fds=True)
(stdoutdata, stderrdata) = p.communicate()
fuse_filepath = os.path.abspath(output_file)
return fuse_filepath
def main():
server = SimpleXMLRPCServer(("localhost", 12345))
server.register_function(fuse, "fuse")
while True:
if __name__ == "__main__":
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment