interesting dict bug

Sick Monkey sickcodemonkey at gmail.com
Sat May 19 22:27:35 EDT 2007


Here is a segment of some code that I have.
CODE:
--------------
   print filename
   params2 =
{'filename':filename,'id3title':title,'id3artist':artist,'id3album':album,'id3year':year,'id3track':track,'id3genre':genre,'uname':username,'password':password,'filesToUpload':open(file,
'rb')}
   print params2
----------------
OUTPUT:
01.mp3
{'password': u'XXX', 'id3year': '2002', 'id3album': 'album, 'id3title':
'Lose Yourself', 'filename': u'01.mp3', 'uname': u'', 'id3genre':
'Soundtrack', 'id3artist': 'Eminem', 'filesToUpload': <open file
u'/Users/ozdon/Music/test2/01-eminemhhh.mp3', mode 'rb' at 0x106a5c0>,
'id3track': 'Unknown'}
--------------
Does anyone know how the random  " u' " is getting into the params2 or know
how to around this?

I am using Python 2.5 on MacOSX.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070519/abe0c3a9/attachment.html>


More information about the Python-list mailing list