示例#1
0
文件: adf11.py 项目: TBody/atomic1D
    def _read_xxdata_11(self):
        #null_fds = os.open(os.devnull, os.O_RDWR)
        #save = os.dup(1)
        #os.dup2(null_fds, 1)

        iclass = adf11_classes[self.class_]
        iunit = _xxdata_11.helper_open_file(self.name)
        ret =  _xxdata_11.xxdata_11(iunit, iclass, **parameters)
        _xxdata_11.helper_close_file(iunit)

        self._raw_return_value = ret
示例#2
0
文件: adf11.py 项目: cfe316/atomic
    def _read_xxdata_11(self):
        null_fds = os.open(os.devnull, os.O_RDWR)
        save = os.dup(1)
        os.dup2(null_fds, 1)

        iclass = adf11_classes[self.class_]
        iunit = _xxdata_11.helper_open_file(self.name)
        ret = _xxdata_11.xxdata_11(iunit, iclass, **parameters)
        _xxdata_11.helper_close_file(iunit)

        self._raw_return_value = ret

        os.dup2(save, 1)  # restore stdout
        os.close(null_fds)  # close the temporary fds
示例#3
0
文件: adf11.py 项目: wagdav/atomic
    def _read_xxdata_11(self):
        null_fds = os.open(os.devnull, os.O_RDWR)
        save = os.dup(1)
        os.dup2(null_fds, 1)

        iclass = adf11_classes[self.class_]
        iunit = _xxdata_11.helper_open_file(self.name)
        ret =  _xxdata_11.xxdata_11(iunit, iclass, **parameters)
        _xxdata_11.helper_close_file(iunit)

        self._raw_return_value = ret

        os.dup2(save, 1) # restore stdout
        os.close(null_fds) # close the temporary fds