i've a problem to split a joining multipe type of file
here's my code for joining two diff type file, pict file (jpg) and audio file(mp3)
an ouput is pict file contains audio file in it.
a problem is how do i check this file is joining file or not?
and how do i split this kind of file?
(suppose that spliting and joining code are separate)
import sys
import os
f = open("e:/Dev/1.jpg", "rb")
g = open("e:/Dev/2.mp3", "rb")
dataList = []
dataList.append(f.read())
dataList.append(g.read())
g.close()
data = f.read()
new = f.name
f = open(new, 'wb')
for data in dataList:
f.write(data)
f.close()
os.remove(g.name)