This program is released under the GNU General Public License version 2.
'''
-from libhooke import * #FIXME
-import libhookecurve as lhc
-
-import libinput as linp
-import liboutlet as lout
-
-from libhooke import WX_GOOD
-from libhooke import HOOKE_VERSION
+from .libhooke import HOOKE_VERSION, WX_GOOD
import wxversion
wxversion.select(WX_GOOD)
from sys import version as python_version
import platform
+from .libhooke import PlaylistXML
+from . import libhookecurve as lhc
+from . import libinput as linp
+from . import liboutlet as lout
+
-class HookeCli(cmd.Cmd):
+class HookeCli(cmd.Cmd, object):
def __init__(self,frame,list_of_events,events_from_gui,config,drivers):
cmd.Cmd.__init__(self)
self.prompt = 'hooke: '
-
-
self.current_list=[] #the playlist we're using
-
self.current=None #the current curve under analysis.
self.plots=None
'''
then undergoes modifications by the plotmanip
modifier functions. The modified plot is saved in self.plots and used if needed by other functions.
'''
-
-
self.pointer=0 #a pointer to navigate the current list
#Things that come from outside
self.current_list, self.playlist_generics=playxml.load(play_to_load)
self.current_playxml=playxml
except IOError:
- print 'File not found.'
+ print 'File not found.', play_to_load
return
- print 'Loaded %s curves' %len(self.current_list)
+ print 'Loaded %s curves from %s' \
+ % (len(self.current_list), play_to_load)
if 'pointer' in self.playlist_generics.keys():
self.pointer=int(self.playlist_generics['pointer'])
Syntax: plot
'''
def do_plot(self,args):
-
- self.current.identify(self.drivers)
+ if self.current.identify(self.drivers) == False:
+ return
self.plots=self.current.curve.default_plots()
try:
self.plots=self.current.curve.default_plots()