except ImportError:
pass
+ #load default list, if possible
+ self.do_loadlist(self.config['defaultlist'])
#HELPER FUNCTIONS
#Everything sending an event should be here
'''
return self.plotmanip[self.config['plotmanips'].index(name)]
+ def _clickize(self, xvector, yvector, index):
+ '''
+ returns a ClickedPoint() object from an index and vectors of x, y coordinates
+ '''
+ point=ClickedPoint()
+ point.index=index
+ point.absolute_coords=xvector[index],yvector[index]
+ point.find_graph_coords(xvector,yvector)
+ return point
+
#HERE COMMANDS BEGIN
def help_set(self):
print self.current_list[self.pointer].notes
else:
if self.notes_filename == None:
- self.notes_filename=raw_input('Filename? ')
+ self.notes_filename=raw_input('Notebook filename? ')
title_line='Notes taken at '+time.asctime()+'\n'
f=open(self.notes_filename,'w')
f.write(title_line)
if len(item.notes)>0:
try:
shutil.copy(item.path, mydir)
- except OSError:
- print 'OSError. Cannot copy file. Perhaps you gave me a wrong directory?'
+ except (OSError, IOError):
+ print 'Cannot copy file. '+item.path+' Perhaps you gave me a wrong directory?'
#OUTLET management
-
-
+#-----------------
def do_outlet_show(self,args):
'''OUTLET_SHOW
---------
else:
self.outlet.delete(args)
-
-
-
-
#OS INTERACTION COMMANDS
#-----------------
def help_dir(self):
def do_current(self,args):
print self.current.path
+ def do_info(self,args):
+ '''
+ INFO
+ ----
+ Returns informations about the current curve.
+ '''
+ print 'Path: ',self.current.path
+ print 'Experiment: ',self.current.curve.experiment
+ print 'Filetype: ',self.current.curve.filetype
+ for plot in self.current.curve.default_plots():
+ for set in plot.vectors:
+ lengths=[len(item) for item in set]
+ print 'Data set size: ',lengths
+
def do_version(self,args):
'''
VERSION