 
     processCmd:()->
       #console.log('2')
+      process.stdout.write(@prompt)
       if(@cmdQueue.length > 0)
         cmd = @cmdQueue.shift()
         @print += @prompt+' '+cmd

      @replProcess.stdout.on('data', (data)->self.processOutputData(data))
      @replProcess.stderr.on('data', (data)->self.processErrorData(data))
      @replProcess.on('close', ()->self.closeRepl())
      #console.log(@print)

myrepl = new Repl('ocaml', ['-noprompt'], "#")
myrepl.writeInRepl("let _ = 2*2;;\n")

    processOutputData:(data) ->
      #console.log(@prompt)
      @print += ""+data
      process.stdout.write(@print)
      @print = ""
      @processCmd()
      #@prompt = true
