File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77'''
88
99from imgurpython import ImgurClient
10-
11- def get_input (string ):
12- ''' Get input from console regardless of python 2 or 3 '''
13- try :
14- return raw_input (string )
15- except :
16- return input (string )
17-
18- def get_config ():
19- ''' More version compatibility stuff '''
20- try :
21- import ConfigParser
22- return ConfigParser .ConfigParser ()
23- except :
24- import configparser
25- return configparser .ConfigParser ()
10+ from helpers import get_input , get_config
2611
2712def authenticate ():
2813 # Get client ID and secret from auth.ini
Original file line number Diff line number Diff line change 1+ '''
2+ These functions have nothing to do with the API, they just help ease
3+ issues between Python 2 and 3
4+ '''
5+
6+ def get_input (string ):
7+ ''' Get input from console regardless of python 2 or 3 '''
8+ try :
9+ return raw_input (string )
10+ except :
11+ return input (string )
12+
13+ def get_config ():
14+ ''' Create a config parser for reading INI files '''
15+ try :
16+ import ConfigParser
17+ return ConfigParser .ConfigParser ()
18+ except :
19+ import configparser
20+ return configparser .ConfigParser ()
You can’t perform that action at this time.
0 commit comments