def execute(self, instance):
     filename = self.evaluate_index(0)
     try:
         open_file(filename,
                   'wb').write(str(instance.objectPlayer.workspace.data))
     except IOError:
         return
Beispiel #2
0
 def execute(self, instance):
     filename = self.evaluate_index(0)
     try:
         open_file(filename, 'wb').write(
             str(instance.objectPlayer.workspace.data))
     except IOError:
         return
Beispiel #3
0
 def execute(self, instance):
     filename = self.evaluate_expression(self.get_parameter(0))
     try:
         open_file(filename, 'wb').write(
             str(instance.objectPlayer.array.generate()))
     except IOError:
         return
Beispiel #4
0
 def execute(self, instance):
     filename = self.evaluate_expression(self.get_parameter(0))
     try:
         open_file(filename,
                   'wb').write(str(instance.objectPlayer.array.generate()))
     except IOError:
         return
 def execute(self, instance):
     filename = self.evaluate_index(0)
     try:
         open_file(filename,
                   'wb').write(str(instance.objectPlayer.array.generate()))
     except IOError:
         return
Beispiel #6
0
 def execute(self, instance):
     filename = self.evaluate_index(0)
     try:
         open_file(filename, 'wb').write(
             str(instance.objectPlayer.array.generate()))
     except IOError:
         return
Beispiel #7
0
 def execute(self, instance):
     vertex = self.evaluate_expression(self.get_parameter(0)) or None
     fragment = self.evaluate_expression(self.get_parameter(1)) or None
     if vertex is not None:
         try:
             vertex = open_file(vertex, 'rb').read()
         except IOError:
             pass
     if fragment is not None:
         try:
             fragment = open_file(fragment, 'rb').read()
         except IOError:
             pass
     instance.objectPlayer.push(vertex, fragment)
Beispiel #8
0
 def execute(self, instance):
     vertex = self.evaluate_expression(self.get_parameter(0)) or None
     fragment = self.evaluate_expression(self.get_parameter(1)) or None
     if vertex is not None:
         try:
             vertex = open_file(vertex, 'rb').read()
         except IOError:
             pass
     if fragment is not None:
         try:
             fragment = open_file(fragment, 'rb').read()
         except IOError:
             pass
     instance.objectPlayer.push(vertex, fragment)
 def execute(self, instance):
     vertex = self.evaluate_index(0) or None
     fragment = self.evaluate_index(1) or None
     if vertex is not None:
         try:
             vertex = open_file(vertex, 'rb').read()
         except IOError:
             pass
     if fragment is not None:
         try:
             fragment = open_file(fragment, 'rb').read()
         except IOError:
             pass
     instance.objectPlayer.push(vertex, fragment)
 def execute(self, instance):
     vertex = self.evaluate_index(0) or None
     fragment = self.evaluate_index(1) or None
     if vertex is not None:
         try:
             vertex = open_file(vertex, 'rb').read()
         except IOError:
             pass
     if fragment is not None:
         try:
             fragment = open_file(fragment, 'rb').read()
         except IOError:
             pass
     instance.objectPlayer.push(vertex, fragment)
Beispiel #11
0
 def execute(self, instance):
     filename = self.evaluate_expression(self.get_parameter(0))
     try:
         data = open_file(filename, 'rb').read().splitlines()
     except IOError:
         return
     instance.objectPlayer.value = instance.objectPlayer.join(data)
 def execute(self, instance):
     filename = self.evaluate_index(0)
     try:
         data = open_file(filename, 'rb').read()
     except IOError:
         return
     instance.objectPlayer.workspace.data = ByteReader(data)
Beispiel #13
0
 def execute(self, instance):
     filename = self.evaluate_expression(self.get_parameter(0))
     try:
         data = open_file(filename, 'rb').read()
     except IOError:
         return
     instance.objectPlayer.workspace.data = ByteReader(data)
Beispiel #14
0
 def execute(self, instance):
     filename = self.evaluate_expression(self.get_parameter(0))
     try:
         data = open_file(filename, 'rb').read()
     except IOError:
         return
     instance.objectPlayer.workspace.data = ByteReader(data)
Beispiel #15
0
 def execute(self, instance):
     filename = self.evaluate_expression(self.get_parameter(0))
     try:
         data = open_file(filename, 'rb').read().splitlines()
     except IOError:
         return
     instance.objectPlayer.value = instance.objectPlayer.join(data)
Beispiel #16
0
 def execute(self, instance):
     filename = self.evaluate_index(0)
     try:
         data = open_file(filename, 'rb').read().splitlines()
     except IOError:
         return
     instance.objectPlayer.value = instance.objectPlayer.join(data)
Beispiel #17
0
 def execute(self, instance):
     filename = self.evaluate_index(0)
     try:
         data = open_file(filename, 'rb').read().splitlines()
     except IOError:
         return
     instance.objectPlayer.value = instance.objectPlayer.join(data)
Beispiel #18
0
 def execute(self, instance):
     filename = self.evaluate_index(0)
     try:
         data = open_file(filename, 'rb').read()
     except IOError:
         return
     instance.objectPlayer.workspace.data = ByteReader(data)
Beispiel #19
0
 def execute(self, instance):
     filename = self.evaluate_index(0)
     try:
         f = open_file(filename, 'wb')
     except IOError:
         return
     f.write('\r\n'.join(instance.objectPlayer.split()))
     f.close()
Beispiel #20
0
 def execute(self, instance):
     filename = self.evaluate_index(0)
     try:
         f = open_file(filename, 'wb')
     except IOError:
         return
     f.write('\r\n'.join(instance.objectPlayer.split()))
     f.close()
Beispiel #21
0
 def execute(self, instance):
     filename = self.evaluate_expression(self.get_parameter(0))
     try:
         f = open_file(filename, 'wb')
     except IOError:
         return
     f.write('\r\n'.join(instance.objectPlayer.split()))
     f.close()
Beispiel #22
0
 def execute(self, instance):
     filename = self.evaluate_expression(self.get_parameter(0))
     try:
         f = open_file(filename, 'wb')
     except IOError:
         return
     f.write('\r\n'.join(instance.objectPlayer.split()))
     f.close()
 def execute(self, instance):
     filename = self.evaluate_index(0)
     try:
         array = WorkspaceArray(ByteReader(open_file(filename, 'rb')))
     except IOError:
         return
     instance.objectPlayer.array = array
     instance.objectPlayer.workspace = array.items[-1]
Beispiel #24
0
 def execute(self, instance):
     filename = self.evaluate_index(0)
     try:
         array = WorkspaceArray(ByteReader(open_file(filename, 'rb')))
     except IOError:
         return
     instance.objectPlayer.array = array
     instance.objectPlayer.workspace = array.items[-1]
Beispiel #25
0
 def execute(self, instance):
     filename = self.evaluate_index(0)
     try:
         file = open_file(filename, 'wb')
     except IOError:
         return
     array = MMFArray()
     value = instance.objectPlayer.split()
     array.setup(len(value), 1, 1, 'Text')
     array.items[0] = {0 : dict(enumerate(value))}
     data = str(array.generate())
     file.write(data)
     file.close()
Beispiel #26
0
 def execute(self, instance):
     filename = self.evaluate_expression(self.get_parameter(0))
     try:
         file = open_file(filename, 'wb')
     except IOError:
         return
     array = MMFArray()
     value = instance.objectPlayer.split()
     array.setup(len(value), 1, 1, 'Text')
     array.items[0] = {0: dict(enumerate(value))}
     data = str(array.generate())
     file.write(data)
     file.close()
Beispiel #27
0
 def execute(self, instance):
     filename = self.evaluate_index(0)
     try:
         data = open_file(filename, 'rb').read()
     except IOError:
         return
     array = MMFArray()
     array.read(ByteReader(data))
     if array.size[1] != 1 or array.size[2] != 1 or not array.flags['Text']:
         return
     value = []
     valueDict = array.items[0][0]
     for i in xrange(len(valueDict)):
         value.append(valueDict[i])
     instance.objectPlayer.value = instance.objectPlayer.join(value)
Beispiel #28
0
 def execute(self, instance):
     filename = self.evaluate_expression(self.get_parameter(0))
     try:
         file = open_file(filename, 'wb')
     except IOError:
         return
     config = RawConfigParser()
     config.optionxform = str
     value = instance.objectPlayer.split()
     config.add_section('List')
     config.set('List', 'Elements', str(len(value)))
     for i, item in enumerate(value):
         config.set('List', 'Element%s' % (i + 1), item)
     config.write(file)
     file.close()
Beispiel #29
0
 def execute(self, instance):
     filename = self.evaluate_index(0)
     try:
         file = open_file(filename, 'wb')
     except IOError:
         return
     config = RawConfigParser()
     config.optionxform = str
     value = instance.objectPlayer.split()
     config.add_section('List')
     config.set('List', 'Elements', str(len(value)))
     for i, item in enumerate(value):
         config.set('List', 'Element%s' % (i+1), item)
     config.write(file)
     file.close()
Beispiel #30
0
 def execute(self, instance):
     filename = self.evaluate_expression(self.get_parameter(0))
     try:
         data = open_file(filename, 'rb').read()
     except IOError:
         return
     array = MMFArray()
     array.read(ByteReader(data))
     if array.size[1] != 1 or array.size[2] != 1 or not array.flags['Text']:
         return
     value = []
     valueDict = array.items[0][0]
     for i in xrange(len(valueDict)):
         value.append(valueDict[i])
     instance.objectPlayer.value = instance.objectPlayer.join(value)
Beispiel #31
0
 def execute(self, instance):
     filename = self.evaluate_expression(self.get_parameter(0))
     try:
         file = open_file(filename, 'rb')
     except IOError:
         return
     config = RawConfigParser()
     config.optionxform = str
     config.readfp(file)
     file.close()
     if 'List' not in config.sections():
         return
     valueDict = {}
     for item in config.options('List'):
         if item.startswith('Element'):
             try:
                 index = int(item[7:])
             except ValueError:
                 continue
             valueDict[index] = config.get('List', item)
     value = [valueDict[k] for k in sorted(valueDict.keys())]
     instance.objectPlayer.value = instance.objectPlayer.join(value)
Beispiel #32
0
 def execute(self, instance):
     filename = self.evaluate_index(0)
     try:
         file = open_file(filename, 'rb')
     except IOError:
         return
     config = RawConfigParser()
     config.optionxform = str
     config.readfp(file)
     file.close()
     if 'List' not in config.sections():
         return
     valueDict = {}
     for item in config.options('List'):
         if item.startswith('Element'):
             try:
                 index = int(item[7:])
             except ValueError:
                 continue
             valueDict[index] = config.get('List', item)
     value = [valueDict[k] for k in sorted(valueDict.keys())]
     instance.objectPlayer.value = instance.objectPlayer.join(value)
Beispiel #33
0
 def execute(self, instance):
     filename = self.evaluate_expression(self.get_parameter(0))
     try:
         open_file(filename, 'a').write(instance.objectPlayer.value)
     except IOError:
         return
Beispiel #34
0
 def execute(self, instance):
     filename = self.evaluate_index(0)
     try:
         open_file(filename, 'a').write(instance.objectPlayer.value)
     except IOError:
         return
Beispiel #35
0
 def execute(self, instance):
     filename = self.evaluate_index(0)
     try:
         instance.objectPlayer.value = open_file(filename, 'rb').read()
     except IOError:
         return
Beispiel #36
0
 def execute(self, instance):
     filename = self.evaluate_expression(self.get_parameter(0))
     try:
         open_file(filename, 'a').write(instance.objectPlayer.value)
     except IOError:
         return
Beispiel #37
0
 def execute(self, instance):
     filename = self.evaluate_index(0)
     try:
         instance.objectPlayer.value = open_file(filename, 'rb').read()
     except IOError:
         return
Beispiel #38
0
 def execute(self, instance):
     filename = self.evaluate_index(0)
     try:
         open_file(filename, 'a').write(instance.objectPlayer.value)
     except IOError:
         return