Hi there,
Thanks for the link. The "unescape" did solve the problem for "*&#xx" but creating for problem for string like: Rai%CC%88 (Raï) or Beyonc%CC%81 (Beyoncé). This is what I get:
Traceback (most recent call last):
File "./metadata.py", line 150, in <module>
artist_dir="%s/%s/%s" %...
I see, I still get it right. In short: using urllib.unquote(), "&" is not being converted to "&" - what am I missing?
(finger crossed!!! hopefully this time it will come up correctly).
Silly me, I should have realized the html-code will be converted into normal character on the browser any way.
So, this is the sample line, taken for the .xml file...
Greetings all,
I'm a python newbie, so my apology for being silly (if it is) with my question.
I was trying to convert converting HTML markup code to human readable text and the sample line I took form the iTumes music library, which is a .xml file.
import os, sys, string
import urllib...
Many thanks mikrom and Kevin for your time. I tried both - both are working but returning different result. I was trying many different dates and I found the difference dates - 2008/10/31 and 2008/11/4 is reported by mikrom's script is: 3
and with the same date, Kevin's script reports: 4
Isn't...
I was only expecting the correct result in standard "human understandable form" - the difference between 2008/10/31 and 2009/1/16 - in this case it isn't. Who says like: "You are 1 year, -9 months and -15 days old" or "It's been 1 year, -9 months and -15 days since we talked"? cheers!!!
Thank you guys for your time helping me out; I really appreciate it.
Zhris:
If I copy your code exactly as it is and run I get this error:
Any idea what am I missing?
rharsh:
I didn't try Delta_YMD before but when I try out your code, I get rather funny result. The difference between 31st...
Yes, that's the actual problem, I think. But there must be some way of doing that. I'll utterly surprised if anyone else hasn't tried this before. Cheers!!!
Greetings all,
As said in the subject line, trying to write a script to print the number of years, months weeks and days between two given dates. Does anyone know how to do that?
So far I've tried Date::Calc module, which returns the difference as number of days but then I'm stuck converting...
Many thanks Kenneth,
getTimezoneOffset() did the trick well. My local time is BST too, I got it working here and I checked with two of my friends in NYC and Seattle and they got the right time too. But one thing I'm confused about: When we say Date() takes the system time, do we refer the...
Okay, let me explain..........
I did exactly the same thing as you did, to test. Now as far as I understand, Date() returns the local time, based on the computer system time. Take that 5 & half hour offset example; in London, now it's BST, which is GMT+1 hr. and with India (IST) the time...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.