<s> import os <EOL> PLOTLY_DIR = os . path . join ( os . path . expanduser ( "<STR_LIT>" ) , "<STR_LIT>" ) <EOL> CREDENTIALS_FILE = os . path . join ( PLOTLY_DIR , "<STR_LIT>" ) <EOL> CONFIG_FILE = os . path . join ( PLOTLY_DIR , "<STR_LIT>" ) <EOL> GRAPH_REFERENCE_FILE = os . path . join ( PLOTLY_DIR , "<STR_LIT>" ) <EOL> TEST_DIR = os . path . join ( os . path . expanduser ( "<STR_LIT>" ) , "<STR_LIT>" ) <EOL> TEST_FILE = os . path . join ( PLOTLY_DIR , "<STR_LIT>" ) <EOL> FILE_CONTENT = { CREDENTIALS_FILE : { '<STR_LIT:username>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : [ ] } , <EOL> CONFIG_FILE : { '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : True , <EOL> '<STR_LIT>' : False , <EOL> '<STR_LIT>' : True , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : True } } <EOL> try : <EOL> os . mkdir ( TEST_DIR ) <EOL> os . rmdir ( TEST_DIR ) <EOL> if not os . path . exists ( PLOTLY_DIR ) : <EOL> os . mkdir ( PLOTLY_DIR ) <EOL> f = open ( TEST_FILE , '<STR_LIT:w>' ) <EOL> f . write ( '<STR_LIT>' ) <EOL> f . close ( ) <EOL> os . remove ( TEST_FILE ) <EOL> _file_permissions = True <EOL> except : <EOL> _file_permissions = False <EOL> def check_file_permissions ( ) : <EOL> return _file_permissions </s>
