-##PLAYLIST INTERACTION COMMANDS
-##-------------------------------
-# def do_genlist(self, folder=lh.hookeDir, filemask='*.*'):
-# '''
-# GENLIST
-# Generates a file playlist.
-# Note it doesn't *save* it: see savelist for this.
-#
-# If [input files] is a directory, it will use all files in the directory for playlist.
-# So:
-# genlist dir
-# genlist dir/
-# genlist dir/*.*
-#
-# are all equivalent syntax.
-# ------------
-# Syntax: genlist [input files]
-# '''
-# #args list is: input folder, file mask
-# if os.path.isdir(folder):
-# path = os.path.join(folder, filemask)
-# #expanding correctly the input list with the glob module :)
-# files = glob.glob(path)
-# files.sort()
-# #TODO: change cursor or progressbar (maybe in statusbar)
-# #self.SetCursor(wx.StockCursor(wx.CURSOR_ARROW))
-# playlist = playlist.Playlist(self.drivers)
-# for item in files:
-# curve = playlist.append_curve_by_path(item)
-# plot = copy.deepcopy(curve.plots[0])
-# #add the 'raw' data
-# curve.add_data('raw', plot.vectors[0][0], plot.vectors[0][1], color=plot.colors[0], style='plot')
-# curve.add_data('raw', plot.vectors[1][0], plot.vectors[1][1], color=plot.colors[1], style='plot')
-# #apply all active plotmanipulators and add the 'manipulated' data
-# for plotmanipulator in self.plotmanipulators:
-# plot = plotmanipulator[1](plot, curve)
-# curve.set_data('manipulated', plot.vectors[0][0], plot.vectors[0][1], color=plot.colors[0], style='plot')
-# curve.add_data('manipulated', plot.vectors[1][0], plot.vectors[1][1], color=plot.colors[1], style='plot')
-# if playlist.count > 0:
-# playlist.name = self._GetUniquePlaylistName(os.path.basename(folder))
-# playlist.reset()
-# self.AddToPlaylists(playlist)
-# self.AppendToOutput(playlist.get_status_string())
-# else:
-# self.AppendToOutput(''.join(['Cannot find folder ', folder]))
-#
-# def do_loadlist(self, filename):
-# '''
-# LOADLIST
-# Loads a file playlist
-# -----------
-# Syntax: loadlist [playlist file]
-# '''
-# #TODO: check for duplicate playlists, ask the user for a unique name
-# #if self.playlist_name in self.playlists:
-#
-# #add hkp extension if necessary
-# if not filename.endswith('.hkp'):
-# filename = ''.join([filename, '.hkp'])
-# #prefix with 'hookeDir' if just a filename or a relative path
-# filename = lh.get_file_path(filename)
-# if os.path.isfile(filename):
-# #TODO: change cursor
-# #self.SetCursor(wx.StockCursor(wx.CURSOR_ARROW))
-# playlist_new = playlist.Playlist(self.drivers)
-# playlist_new.load(filename)
-# if playlist_new.count > 0:
-# for curve in playlist_new.curves:
-# plot = copy.deepcopy(curve.plots[0])
-# for plotmanip in self.plotmanipulators:
-# #to_plot = plotmanip[1](to_plot, curve)
-# plot = plotmanip[1](plot, curve)
-# curve.set_data('manipulated', plot.vectors[0][0], plot.vectors[0][1], color=plot.colors[0], style='plot')
-# curve.add_data('manipulated', plot.vectors[1][0], plot.vectors[1][1], color=plot.colors[1], style='plot')
-# self.AddToPlaylists(playlist_new)
-# #else:
-# ##TODO: display dialog
-# self.AppendToOutput(playlist_new.get_status_string())
-# #TODO: change cursor
-# #self.SetCursor(wx.StockCursor(wx.CURSOR_ARROW))
-# else:
-# #TODO: display dialog
-# self.AppendToOutput(''.join['File ', filename, ' not found.\n'])
-# pass
-#
-# def do_savelist(self, filename):
-# '''
-# SAVELIST
-# Saves the current file playlist on disk.
-# ------------
-# Syntax: savelist [filename]
-# '''
-#
-# #self.playlist_generics['pointer'] = self._GetActiveCurveIndex
-# pointer = self._GetActiveCurveIndex()
-# #autocomplete filename if not specified
-# if not filename.endswith('.hkp'):
-# filename = filename.join(['.hkp'])
-#
-# playlist = self.GetActivePlaylist()
-# playlist.set_XML()
-# playlist.save(filename)