#!/usr/bin/python
# -*- coding: utf-8 -*-

__all__ = ['Instance', 'Server']

import os

class CwdChanger(object):
	
	def __init__(self, directory):
		self.directory = directory
		self.old_cwd = None
	
	def __enter__(self):
		self.old_cwd = os.getcwd()
		os.chdir(self.directory)
		
	def __exit__(self, exc_type, exc_value, traceback):
		os.chdir(self.old_cwd)
		self.old_cwd = None
		
from Server import Initializer, Server
from UI import MainFrame
