Skip to content

Instantly share code, notes, and snippets.

@waynemoore
waynemoore / month_day_range.py
Created July 27, 2011 11:01
Get first and last day of a particular month using python-dateutil.
import datetime
# requires python-dateutil (http://labix.org/python-dateutil)
from dateutil.relativedelta import relativedelta
def get_month_day_range(date):
"""
For a date 'date' returns the start and end date for the month of 'date'.
Month with 31 days:
# Minimal media player using wxWidgets
import wx
from wx.media import *
import os
class PlayerView(wx.Frame):
def __init__(self):
super(PlayerView, self).__init__(None, -1, "LamePlayer", wx.DefaultPosition )