def execute(self, instance): defaultPath = convert_path( self.evaluate_expression(self.get_parameter(0))) objectPlayer = instance.objectPlayer objectPlayer.path = open_file_selector(title = objectPlayer.title, filters = objectPlayer.filters, root = defaultPath)
def execute(self, instance): path = convert_path(self.get_filename(self.get_parameter(0))) try: data = open(path, 'rb').read() except IOError: return instance.objectPlayer.set_text(data)
def execute(self, instance): filename = self.evaluate_expression(self.get_parameter(0)) try: gzip.GzipFile(convert_path(filename), 'wb').write( str(instance.objectPlayer.workspace.data)) except IOError: return
def execute(self, instance): defaultPath = convert_path( self.evaluate_expression(self.get_parameter(0))) objectPlayer = instance.objectPlayer objectPlayer.path = open_save_selector(title=objectPlayer.title, filters=objectPlayer.filters, root=defaultPath)
def execute(self, instance): path = convert_path( self.get_filename(self.get_parameter(0))) try: open(path, 'wb').write(str(instance.objectPlayer)) except IOError: return
def execute(self, instance): path = convert_path(self.evaluate_index(0)) lines = [] for item in glob(path): if os.path.isfile(item): lines.append(os.path.split(item)[1]) instance.objectPlayer.listObject.extend(lines)
def get(self, instance): path = convert_path(self.next_argument()) try: value = time.gmtime(os.path.getatime(path)) except OSError: return '' return time.strftime('%d/%m/%y', value)
def execute(self, instance): filename = self.evaluate_index(0) try: data = gzip.GzipFile(convert_path(filename), 'rb').read() except IOError: return instance.objectPlayer.workspace.data = ByteReader(data)
def execute(self, instance): filename = self.evaluate_index(0) try: gzip.GzipFile(convert_path(filename), 'wb').write( str(instance.objectPlayer.array.generate())) except IOError: return
def execute(self, instance): defaultPath = convert_path( self.evaluate_index(0)) objectPlayer = instance.objectPlayer objectPlayer.path = open_save_selector(title = objectPlayer.title, filters = objectPlayer.filters, root = defaultPath)
def execute(self, instance): filename = convert_path(self.get_filename(self.get_parameter(0))) try: open(filename, 'wb').write(instance.objectPlayer.array.generate().data()) except IOError: pass
def execute(self, instance): filename = convert_path(self.get_filename(self.get_parameter(0))) try: reader = ByteReader(open(filename, 'rb')) instance.objectPlayer.array.read(reader) except IOError: pass
def execute(self, instance): path = convert_path(self.evaluate_index(0)) lines = [] for item in glob(path): if os.path.isdir(item): lines.append('[%s]' % os.path.basename(item)) instance.objectPlayer.listObject.extend(lines)
def execute(self, instance): filename = convert_path(self.get_filename(self.get_parameter(0))) instance.objectPlayer.reset() try: lines = open(filename, 'rb').read().splitlines() except IOError: return instance.objectPlayer.listObject.extend(lines)
def check(self, instance): path = convert_path(self.evaluate_expression(self.get_parameter(0))) try: f = open(path, 'r+') f.close() return True except (IOError, OSError): return False
def execute(self, instance): path = convert_path( self.evaluate_index(0)) lines = [] for item in glob(path): if os.path.isdir(item): lines.append('[%s]' % os.path.basename(item)) instance.objectPlayer.listObject.extend(lines)
def check(self, instance): path = convert_path(self.evaluate_index(0)) try: f = open(path, 'r+') f.close() return True except (IOError, OSError): return False
def execute(self, instance): filename = convert_path( self.get_filename(self.get_parameter(0))) try: open(filename, 'wb').write( instance.objectPlayer.array.generate().data()) except IOError: pass
def execute(self, instance): path = convert_path( self.evaluate_index(0)) lines = [] for item in glob(path): if os.path.isfile(item): lines.append(os.path.split(item)[1]) instance.objectPlayer.listObject.extend(lines)
def execute(self, instance): filename = convert_path( self.get_filename(self.get_parameter(0))) try: reader = ByteReader(open(filename, 'rb')) instance.objectPlayer.array.read(reader) except IOError: pass
def check(self, instance): path = convert_path( self.evaluate_expression(self.get_parameter(0))) try: f = open(path, 'r+') f.close() return True except (IOError, OSError): return False
def execute(self, instance): filename = self.evaluate_index(0) try: array = WorkspaceArray( ByteReader(gzip.GzipFile(convert_path(filename), 'rb').read())) except IOError: return instance.objectPlayer.array = array instance.objectPlayer.workspace = array.items[-1]
def execute(self, instance): filename = self.evaluate_index(0) try: array = WorkspaceArray(ByteReader( gzip.GzipFile(convert_path(filename), 'rb').read())) except IOError: return instance.objectPlayer.array = array instance.objectPlayer.workspace = array.items[-1]
def check(self, instance): path = convert_path( self.evaluate_index(0)) try: f = open(path, 'r+') f.close() return True except (IOError, OSError): return False
def action(self, instance): src = convert_path(self.evaluate_index(0)) dest = convert_path(self.evaluate_index(1)) shutil.copyfile(src, dest)
def load(self, filename): path = convert_path(filename) self.config = FastINI(path)
def action(self, instance): src = convert_path( self.evaluate_index(0)) dest = convert_path( self.evaluate_index(0)) open(dest, 'ab').write(open(src, 'rb').read())
def action(self, instance): src = convert_path( self.evaluate_index(0)) dest = convert_path( self.evaluate_index(1)) shutil.copyfile(src, dest)
def get(self, instance): path = convert_path(self.next_argument()) try: return os.path.getsize(path) except OSError: return 0
def check(self, instance): path = convert_path(self.evaluate_index(0)) return os.path.isdir(path)
def action(self, instance): path = convert_path( self.evaluate_index(0)) os.rmdir(path)
def check(self, instance): path = convert_path( self.evaluate_expression(self.get_parameter(0))) return os.path.isdir(path)
def action(self, instance): path = convert_path(self.evaluate_index(0)) open(path, 'wb').close()
def action(self, instance): src = convert_path(self.evaluate_index(0)) dest = convert_path(self.evaluate_index(0)) os.rename(src, dest)
def action(self, instance): value = self.evaluate_index(0) filename = convert_path( self.evaluate_index(0)) open(filename, 'ab').write(value)
def action(self, instance): src = convert_path( self.evaluate_index(0)) dest = convert_path( self.evaluate_index(0)) os.rename(src, dest)
def check(self, instance): path = convert_path( self.evaluate_index(0)) return os.path.isdir(path)
def play_sound_file(self, path, loops=1, channel=None): path = convert_path(path) if path not in self.loaded: self.loaded[path] = FileData(path) self.play_sound_item(self.loaded[path], loops, channel)
def get(self, instance): value = convert_path(self.next_argument()) return os.path.splitdrive(os.path.dirname(value))[1]
def execute(self, instance): path = convert_path(self.get_filename(self.get_parameter(0))) try: open(path, 'wb').write(instance.objectPlayer.get_text()) except IOError: return
def get(self, instance): value = convert_path(self.next_argument()) return os.path.normpath(value)
def action(self, instance): path = convert_path( self.evaluate_index(0)) open(path, 'wb').close()
def get(self, instance): value = convert_path(self.next_argument()) return os.path.splitext(os.path.basename(value))[1]
def action(self, instance): path = convert_path(self.evaluate_expression(self.get_parameter(0))) os.rmdir(path)
def action(self, instance): src = convert_path(self.evaluate_index(0)) dest = convert_path(self.evaluate_index(0)) open(dest, 'ab').write(open(src, 'rb').read())
def action(self, instance): path = convert_path( self.evaluate_expression(self.get_parameter(0))) os.rmdir(path)
def action(self, instance): path = convert_path(self.evaluate_index(0)) os.rmdir(path)
def action(self, instance): value = self.evaluate_index(0) filename = convert_path(self.evaluate_index(0)) open(filename, 'ab').write(value)
def execute(self, instance): defaultPath = convert_path(self.evaluate_index(0)) objectPlayer = instance.objectPlayer objectPlayer.path = open_file_selector(title=objectPlayer.title, filters=objectPlayer.filters, root=defaultPath)