@classmethod
    def runGraphInXterm(cls, graph, keepWindowOpen=True):

        try:
            from tempfile import NamedTemporaryFile

            graphName = ''
            with NamedTemporaryFile(mode='w', prefix='localGraph_', delete=False) as graphFile:
                graphFile.write(pickle.dumps(graph))
                graphName = graphFile.name

            script = """
import pickle
import time

with open("__graphFile__") as file:
  g = pickle.loads(file.read())
  g.execute()
"""
            script = script.replace("__graphFile__", graphName)

            with NamedTemporaryFile(mode='w', prefix='localScript_', delete=False) as scriptFile:
                scriptFile.write(script)
                # args = 'xterm -title "Running" -e "python {script}'.format(script=scriptFile.name)

                if keepWindowOpen:
                    args = 'xterm -title "Running" -e "python {script}' \
                           '; echo -ne \'\033]0;Finished\007\'' \
                           '; sh -i"'.format(script=scriptFile.name)
                else:
                    args = 'xterm -title "Running" -e "python {script}"'.format(script=scriptFile.name)

            print "Start local render, please check your terminal for details."
            process = subprocess.Popen(args, shell=True)
            print "Process started: {pid}".format(pid=process.pid)

        except ValueError as e:
            raise CommandError("%s" % e)

        except OSError as e:
            raise CommandError("Error during process exec: %s" % e)

        except Exception as e:
            raise e
forget_me -- forget the previous logged in user
dataset/ETHPy150Open mikrosimage/OpenRenderManagement/src/puliclient/runner.py/RunnerToolkit.runGraphInXterm--crossover with--dataset/ETHPy150Open mopidy/pyspotify/examples/shell.py/Commander.do_forget_me