#NEWLINE# def write_credentials_file( sub_id , token ) : #NEWLINE# #INDENT# folder = os . path . dirname ( __file__ ) #NEWLINE# path = os . path . join ( folder , 'credentials_real.json' ) #NEWLINE# credentials = { #NEWLINE# #INDENT# 'subscriptionid' : sub_id , #NEWLINE# 'authorization_header' : 'Bearer {}' . format ( token ) , #NEWLINE# #UNINDENT# } #NEWLINE# with open ( path , 'w' ) as f : #NEWLINE# #INDENT# f . write ( json . dumps ( credentials ) ) #NEWLINE# #UNINDENT# return path