# Import modules
from selenium import webdriver
#
# get initial window size
driver = webdriver.Firefox()
print driver.get_window_size()
#
# set window size (windth, height) in pixels
driver.set_window_size(480, 320)
#
# Print new size
print(driver.get_window_size())
#
# maximize window
driver.maximize_window()
#
# Print new size
print(driver.get_window_size())
#
driver.quit()