[問題] 請問這個code的涵義

看板Python作者 (克盡全力)時間14年前 (2011/04/19 18:35), 編輯推噓0(001)
留言1則, 1人參與, 最新討論串1/1
請問下列的code是否可以用在計算反應時間RT import pickle, os # change filename to match if you're using a username other than 'default' filename = 'default-sessions.dat' f = open(filename) sessions = [] try: while 1: sessions.append(pickle.load(f)) except EOFError: pass # do something with sessions here # for example, to get an idea of what is available, try print "Loaded %i sessions" % len(sessions) print "Available variables for the first session: \t", sessions[0].keys() print "Position reaction times for the first session: \t" i = 1 for rt in sessions[0]['session']['position1_rt']: print i, '=', rt i += 1 謝謝~ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 120.126.40.172

04/21 00:20, , 1F
這有能回答你嗎 =..=a 誰知道.dat儲存的資料結構....
04/21 00:20, 1F
文章代碼(AID): #1DhMLq17 (Python)
文章代碼(AID): #1DhMLq17 (Python)