def get_file_spec():
 global file_spec
 if (file_spec is None):
  if (sys.version_info[0] == 3):
   import _io
   file_spec = list(set(dir(_io.TextIOWrapper)).union(set(dir(_io.BytesIO))))
  else:
   file_spec = file

def get_file_spec ( ) : global file_spec if ( file_spec is None ) : if ( sys . version_info [ 0 ] == 3 ) : import _io file_spec = list ( set ( dir ( _io . TextIOWrapper ) ) . union ( set ( dir ( _io . BytesIO ) ) ) ) else : file_spec = file
return a python 2 and 3 compatible version of a file spec .