standard.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:cebl 作者: idfah 项目源码 文件源码
def stopRecording(self):
        if self.recordingTime is not None:
            secsToSave = time.time() - self.recordingTime

            wx.LogMessage('Page %s saving %f secs of EEG' % (self.name, secsToSave))

            cap = self.src.getEEGSecs(secsToSave, filter=False)

            saveDialog = wx.FileDialog(self, message='Save EEG data.',
                wildcard='Pickle (*.pkl)|*.pkl|All Files|*',
                style=wx.FD_SAVE | wx.FD_OVERWRITE_PROMPT)

            try:
                if saveDialog.ShowModal() != wx.ID_CANCEL:
                    cap.saveFile(saveDialog.GetPath())
            except Exception as e:
                wx.LogError('Save failed!')
                raise
            finally:
                saveDialog.Destroy()

        self.recordButton.SetLabel('Start Recording')
        self.recordingTime = None
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号