1 #!/usr/bin/env python
\r
6 File class for Hooke.
\r
8 Copyright 2010 by Dr. Rolf Schmidt (Concordia University, Canada)
\r
10 This program is released under the GNU General Public License version 2.
\r
18 def __init__(self, filename=None, drivers=None):
\r
21 self.plot = lib.plot.Plot()
\r
22 if filename is None:
\r
23 self.filename = None
\r
27 self.filename = filename
\r
28 self.path, self.name = os.path.split(filename)
\r
30 def identify(self, drivers):
\r
32 identifies a curve and returns the corresponding object
\r
34 for driver in drivers:
\r
35 current_driver = driver(self.filename)
\r
36 if current_driver.is_me():
\r
37 #bring on all the driver, with its load of methods etc.
\r
38 #so we can access the whole of it.
\r
39 self.plot = current_driver.default_plots()
\r
40 self.driver = current_driver
\r