I have been developing some tools for the media production lately, i found a neat way to add or subtract certain amount of seconds to a given time code.
for example i have a video that starts from 12:45:05 and i want to add 59 seconds to it and use the new time.
from datetime import datetime from datetime import timedelta time = datetime(2009, 1, 1, 12, 45, 05, 0) diff = timedelta(seconds = 59) final_time = time + diff
No related posts.
Nice example!
If you have more such useful tips please post them at http://www.php2python.com too. I’m trying to build a resource for people moving from php to python.
Thanks for the reply
actually i am not moving from php to python, each tool has its powerful area of use.
I like php for web & python for Desktop, i visited your website, good one