Creates a PRAW instance using OAuth with the given authentication information.
	Because the retrieved token is stored on the file system (script_key is used to distinguish between files), this function is safe
	to call across multiple instances or runs. The token is renewed after one hour.
	
	Note: Only script-based oauth is supported.
	
	:param oauth_key:		Reddit oauth key
	:param oauth_secret: 	Reddit oauth secret
	:param username: 		Reddit username
	:param password: 		Reddit password
	:param oauth_redirect: 	Redirect used in registered Reddit app
	:param oauth_scopes: 	Set of scopes passed to PRAW
	:param useragent: 		Connection useragent (this should be changed, otherwise you'll be heavily rate limited)
	:param script_key: 		Key used to distinguish between local token files
	
	:return: A PRAW instance if a token could be retrieved, otherwise None.

def connect(oauth_key, oauth_secret, username, password, oauth_redirect=_DEFAULT_REDIRECT, oauth_scopes=set(), useragent=_DEFAULT_USERAGENT, script_key=None):
	"""
	Creates a PRAW instance using OAuth with the given authentication information.
	Because the retrieved token is stored on the file system (script_key is used to distinguish between files), this function is safe
	to call across multiple instances or runs. The token is renewed after one hour.
	
	Note: Only script-based oauth is supported.
	
	:param oauth_key:		Reddit oauth key
	:param oauth_secret: 	Reddit oauth secret
	:param username: 		Reddit username
	:param password: 		Reddit password
	:param oauth_redirect: 	Redirect used in registered Reddit app
	:param oauth_scopes: 	Set of scopes passed to PRAW
	:param useragent: 		Connection useragent (this should be changed, otherwise you'll be heavily rate limited)
	:param script_key: 		Key used to distinguish between local token files
	
	:return: A PRAW instance if a token could be retrieved, otherwise None.
	"""
	import praw
	
	oauth_token = get_oauth_token(oauth_key, oauth_secret, username, password, useragent=useragent, script_key=script_key)
	if oauth_token is None:
		log.debug("Can't create PRAW instance without token")
		return None
	
	r = praw.Reddit(user_agent=useragent, disable_update_check=True)
	r.set_oauth_app_info(oauth_key, oauth_secret, oauth_redirect)
	r.set_access_credentials(oauth_scopes, oauth_token)
	r.config.api_request_delay = 1
	return r