うまく機能しません
というのは、どのような状況について言っているのでしょうか。
lang
1% python
2Python 3.5.0 (default, Feb 15 2016, 03:56:03)
3[GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)] on darwin
4Type "help", "copyright", "credits" or "license" for more information.
5>>> import shelve
6>>> book=shelve.open("addresses.txt")
7>>> book['flintstone']=('fred','555-1234','1233 Bedrock place')
8>>> book['rubble']=('barney','555-4321','1235 Bedrock place')
9>>> book.close()
10>>> quit()
11
12% ls addresses.txt
13addresses.txt
14
15% python
16Python 3.5.0 (default, Feb 15 2016, 03:56:03)
17[GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)] on darwin
18Type "help", "copyright", "credits" or "license" for more information.
19>>> import shelve
20>>> book=shelve.open("addresses.txt")
21>>> list(book.keys())
22['rubble', 'flintstone']
23>>> book['rubble']
24('barney', '555-4321', '1235 Bedrock place')
25>>> book.close()
26>>> quit()
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/02/15 00:46