I'm trying out the latest version 0.8.0 of the PyMeasure package using the examples given in their tutorial from the official documentation. I want to add the directory input to my GUI but I get the error
TypeError: init() got an unexpected keyword argument 'directory_input'
when I run my script. Here is the part of the code where I added this feature according to the documentation on the pymeasure readthedoc site.
class MainWindow(ManagedWindow):
def __init__(self):
super(MainWindow, self).__init__(
procedure_class=RandomProcedure,
inputs=['iterations', 'delay', 'seed'],
displays=['iterations', 'delay', 'seed'],
x_axis='Iteration',
y_axis='Random Number',
directory_input=True
)
self.setWindowTitle('GUI Example')
def queue(self):
directory = self.directory
filename = unique_filename(directory)
#filename = tempfile.mktemp()
procedure = self.make_procedure()
results = Results(procedure, filename)
experiment = self.new_experiment(results)
self.manager.queue(experiment)
def closeEvent(self,event):
QtGui.QApplication.quit()
My version check showed that I'm using version 0.8.0, however when I investigated the ManagedWindow class is shows this definition
ManagedWindow(procedure_class, inputs=(), displays=(), x_axis=None, y_axis=None,
log_channel='', log_level=logging.INFO, parent=None, sequencer=False,
sequencer_inputs=None, sequence_file=None, inputs_in_scrollarea=False)
which doesn't include the option directory_input as an argument.
Does anybody have an idea why this is not available although the versions from the documentation and mine are the same?
question from:
https://stackoverflow.com/questions/65906885/pymeasure-managedwindow-class-doesnt-contain-directory-input-argument 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…