def temp_db_filename():
 try:
  (h, test_db_fname) = tempfile.mkstemp('_BioSQL.db', dir='/dev/shm')
 except OSError:
  (h, test_db_fname) = tempfile.mkstemp('_BioSQL.db')
 os.close(h)
 return test_db_fname

def temp_db_filename ( ) : try : ( h , test_db_fname ) = tempfile . mkstemp ( '_BioSQL.db' , dir = '/dev/shm' ) except OSError : ( h , test_db_fname ) = tempfile . mkstemp ( '_BioSQL.db' ) os . close ( h ) return test_db_fname
generate a temporary filename for sqlite database .