| Reply | « Previous Thread | Next Thread » |
|
Code:
def getID3(filename):
fp = open(filename, 'r')
fp.seek(-128, 2)
fp.read(3) # TAG iniziale
title = fp.read(30)
artist = fp.read(30)
album = fp.read(30)
year = fp.read(4)
comment = fp.read(28)
fp.close()
return {'title':title, 'artist':artist, 'album':album, 'year':year}
info = getID3('c:\\example.mp3')
a=info['title']
f=open('c:\\title.txt','w')
f.write(a)
f.close()
how can i solve this problem. i dont want this '????????' |
| cool_eagle |
| View Public Profile |
| Find all posts by cool_eagle |
|
Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
Offline
Forum Nokia Champion
|
|
|
Quote:
Last edited by bogdan.galiceanu : 2008-10-31 at 13:32.
|
|
this code write in to title.txt
EXAMPLE ?????????????????????????? i want to write EXAMPLE. not EXAMPLE??????????????????????? |
| cool_eagle |
| View Public Profile |
| Find all posts by cool_eagle |
|
Quote:
Well, looking at your code and guessing the number of "?" characters, I would say you write exactly what you read from the MP3 file: Code:
title = fp.read(30) a=info['title'] f.write(a) Cheers, --jouni |
|
Quote:
![]() ![]() |
| cool_eagle |
| View Public Profile |
| Find all posts by cool_eagle |
|
how can know lenght of title :S
fp.read(10) or fp.read(15) exmple |
| cool_eagle |
| View Public Profile |
| Find all posts by cool_eagle |
|
Maybe you can try "readline()", where you can read the lines like if you place title on first line, then artist on second line
or You can differentiate between all the artists, albums etc with some identifier like colon,comma etc. IDEAS is all they need but still they think only Genius can give them that. |
| shubhendra |
| View Public Profile |
| Find all posts by shubhendra |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Autostart application and reading tag UID with one touch | choege | Near Field Communication | 5 | 2008-01-03 14:45 |
| netcards - Problem with opening adapter | kernj | Symbian Tools & SDKs | 5 | 2007-01-10 09:56 |
| Problem: S60 SDK for CW in PC with .NET | anttij | Carbide.c++ IDE and plug-ins | 1 | 2005-02-28 12:36 |
| About 6230 Bt Problem | eerkek | Bluetooth Technology | 17 | 2005-02-08 13:33 |
| 7210 Silent Problem | MarkMckim | Mobile Java General | 1 | 2003-03-18 13:36 |