Example #1
0
 def change_datatype(self, data, ext):
     data.extension = ext
     # call init_meta and copy metadata from itself.  The datatype
     # being converted *to* will handle any metadata copying and
     # initialization.
     if data.has_data():
         data.set_size()
         data.init_meta( copy_from=data )
     return data
Example #2
0
 def change_datatype(self, data, ext, set_meta = True ):
     data.extension = ext
     # call init_meta and copy metadata from itself.  The datatype
     # being converted *to* will handle any metadata copying and
     # initialization.
     if data.has_data():
         data.set_size()
         data.init_meta( copy_from=data )
         if set_meta:
             #metadata is being set internally
             data.set_meta( overwrite = False )
             data.set_peek()
     return data
Example #3
0
def change_datatype( data, ext ):
    data.extension = ext
    data.init_meta()
    if data.has_data():
        data.set_peek()
    return data
Example #4
0
def change_datatype(data, ext):
    data.extension = ext
    data.init_meta()
    if data.has_data():
        data.set_peek()
    return data