shelve Questions
2
Solved
I wish to use shelve in an asyncio program and I fear that every change will cause the main event loop to stall.
While I don't mind the occasional slowdown of the pickling operation, the disk write...
Dejecta asked 8/8 at 21:27
2
I installed python3.6 in windows machine. And get below error while open my.db file.
my.db file created by my program in ubuntu16.04 in python3.6, using shelve module.
In [1]: import shelve
In [...
Anticipation asked 23/6, 2018 at 7:8
4
Solved
Does the Python shelve module have any protection built in to make sure two processes aren't writing to a file at the same time?
8
Solved
I'm making a program that can access data stored inside a class. So for example I have this class:
#!/usr/bin/env python
import shelve
cur_dir = '.'
class Person:
def __init__(self, name, score...
6
I have shelved my 26 java files changes via Intellij Idea 2016.2.1 and I checkout to different branch.
When I came to old branch to check my shelved changes.
I gone a mad now, I lost all the file...
Jarred asked 20/9, 2016 at 8:11
9
Solved
One of our team member (located in different region) has shelved changes in P4 with changelist 1234.
Now, if I want to see what files are modified snf what are the changes, how can I do this?
W...
3
Solved
I am using Pycharm. First of all whenever any module is imported in Pycharm. The complete import line fades out. But in case of import shelve doesn't fade out. Also when I run the file i get follow...
Prophase asked 25/1, 2015 at 2:57
4
I am hoping for a little advice on shelves/databases in Python.
Problem: I have a database created on the mac, that I want to use on windows 7. I use Python 3.2, MacOS 10.7, and win 7.
When I ope...
Keeton asked 2/1, 2012 at 19:46
3
Solved
Is shelve in Python used for data persistence thread safe? If not, what's a good alternative?
Vitiligo asked 4/3, 2011 at 2:52
6
I have created a shelve file and inserted a dictionary data. Now I want to cleanup that shelve file to reuse as a clean file.
import shelve
dict = shelve.open("Sample.db")
# insert some data into ...
2
Solved
When is it appropriate to use pickle, and when is it appropriate to use shelve? That is to say, what do they do differently from each other?
From my research, I understood that pickle can turn ever...
Nervous asked 5/11, 2010 at 3:42
5
Solved
Let's assume that some developer in my team shelved his changes that he did in branch A. And I am working on branch B. Can I unshelve his changes into branch B? (By GUI or command prompt)
6
Solved
I create a file called foo_module.py containing the following code:
import shelve, whichdb, os
from foo_package.g import g
g.shelf = shelve.open("foo_path")
g.shelf.close()
print whichdb.which...
2
Solved
This is the first time I post in stack overflow. Perhaps I can get the solution that I need.
busdata=shelve.open("Database")
for lctno in busdata.keys():
outputLine( lctno , busdata[ lctno ])
I...
0
I'm using the
shelve module with gdbm to store Python objects. I understand that shelve uses pickle to store the objects. Unfortunately, the sizes of my shelves are too large. I found this solutio...
3
Solved
I just tried a Python shelve module as the persistent cache for data fetched from the external service. The complete example is here.
I was wondering what would the best approach if I want to make...
Ectoblast asked 6/12, 2013 at 9:18
1
I tried to export path to system environment and what happens:
Path is for BerkleyDB library (need for shelve Python library, without it I have an error:
File "/kplusnfs/script/ns/processes/curren...
2
I'm a teacher, and I'm trying to write a simple function that saves my students' emails in a dictionary for use in another program. I need the dictionary to be saved across multiple executions, so ...
Nachison asked 7/11, 2017 at 15:39
3
I need to download a shelveset from TFS to a local folder. Is there any tools or add-in for Visual studio 2010 to download shelveset
8
Is shelving in TFS merely a soft checkin so other team members can see the source code?
i.e. the shelved code will not be compiled right?
3
Solved
shelve documentation says:
The choice of which database package will be used (such as dbm, gdbm
or bsddb) depends on which interface is available.
What is that mean? How to determine which pa...
Emphasize asked 30/12, 2012 at 16:50
4
I want to use a tuple (1,2,3) as a key using the shelve module in Python. I can do this with dictionaries:
d = {}
d[(1,2,3)] = 4
But if i try it with shelve:
s = shelve.open('myshelf')
s[(1,2,3...
2
I am creating a shelve file of sequences from a genomic FASTA file:
# Import necessary libraries
import shelve
from Bio import SeqIO
# Create dictionary of genomic sequences
genome = {}
with open...
Leung asked 23/11, 2014 at 12:33
0
While writing to a shelve object I encountered a problem, where I cannot write more records. I get HASH: Out of overflow pages. Increase page size followed by _dbm.error: cannot add item to databas...
Ecospecies asked 24/4, 2017 at 15:35
2
Solved
I wrote a few unittests with shelve at http://code.google.com/p/filecache/ and python 2 saves exactly the filename I specifiy in shelve.open() but in python 3 I get 3 different files "bak", "dat" a...
Scruff asked 11/2, 2011 at 8:15
1 Next >
© 2022 - 2024 — McMap. All rights reserved.