Skip to content

Instantly share code, notes, and snippets.

@jaredhirsch
Created August 16, 2012 23:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaredhirsch/3374463 to your computer and use it in GitHub Desktop.
Save jaredhirsch/3374463 to your computer and use it in GitHub Desktop.
conditional imports ftw
#!/usr/bin/env python
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
class RestmailInbox(object):
def __init__(self, object):
prod = True # just hard coding for the moment
if prod:
from restmail_prod import RestmailInbox
else:
from restmail_vm import RestmailInbox
self.__class__ = RestmailInbox
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment