comands apart

    def ret_line(number):
        f = open('/home/nkp/temp_rev.ngc', "r") #here prepared code(revers Gcode)
        lines = f.readlines()
        f.close()
        if number >= 0:
            return lines[number]
    
    def zoomin(event=None):
        global num_curent_line 
        num_curent_line = int(comp["curent-line"]) - 1
        commands.task_stop()
        ensure_mode(linuxcnc.MODE_MDI)
	
    def zoomout(event=None):
        global num_curent_line 
        commands.send_mdi_command(commands.ret_line(num_curent_line))
        print 'comand:',commands.ret_line(num_curent_line), 'curent line:', num_curent_line
        num_curent_line -= 1