Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Python and anydbm problem
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="metb" data-source="post: 528691" data-attributes="member: 41693"><p>After upgrading to 10.5, a peculiar problem with the "anydbm" module in python has emerged.</p><p></p><p>A sample run using an existing database :</p><p></p><p>[CODE]</p><p>>>> db = anydbm.open("SENSOR_DB","r")</p><p>>>> db.keys()</p><p>[]</p><p>>>> db.has_key("Epsilon.local__20071115:15:09:32")</p><p>1</p><p>>>> db.keys()</p><p>['Epsilon.local__20071115:15:03:07']</p><p></p><p>[/CODE]</p><p></p><p>The database is opened and contains at fist no keys, ie. returns an empty dictionary.</p><p></p><p>When checking for a specific key, it is is found. After that only one other key is visible. The visible key is NOT the same as found using the key directly.</p><p></p><p>The code using the anydbm worked flawlessly under 10.4 and python 2.4.</p><p></p><p>Any suggestions ?</p><p></p><p>B.</p></blockquote><p></p>
[QUOTE="metb, post: 528691, member: 41693"] After upgrading to 10.5, a peculiar problem with the "anydbm" module in python has emerged. A sample run using an existing database : [CODE] >>> db = anydbm.open("SENSOR_DB","r") >>> db.keys() [] >>> db.has_key("Epsilon.local__20071115:15:09:32") 1 >>> db.keys() ['Epsilon.local__20071115:15:03:07'] [/CODE] The database is opened and contains at fist no keys, ie. returns an empty dictionary. When checking for a specific key, it is is found. After that only one other key is visible. The visible key is NOT the same as found using the key directly. The code using the anydbm worked flawlessly under 10.4 and python 2.4. Any suggestions ? B. [/QUOTE]
Verification
Name this item 🌈
Post reply
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
Python and anydbm problem
Top