Stats:
Python2.3
windows2000 professional
If I have ``Full Control'' of a bsddb file, no problem: import bsddb a = bsddb.btopen("c:/sharedrw/db/npanxx2pseudo.db", "r") a.close()
.... but if I change to read-only access (as in permissions on file):
a = bsddb.btopen("c:/sharedrw/db/npanxx2pseudo.db", "r") a.close()
Traceback (most recent call last):
File "<pyshell#30>", line 1, in -toplevel-
a.close()
File "C:\Python23\lib\bsddb\__init__.py", line 101, in close
v = self.db.close()
DBPermissionsError: (1, 'Operation not permitted')
Performing a close() with read/write access with file opened "r" does
not change the last-modified time/date.
Is this a bug?
Thanks!
Harry. 3 2664 ha************@hotpop.com (Harry Pehkonen) writes: Is this a bug?
Yes.
Without further investigation, it might be a bug in Python, _bsddb,
Sleepycat BSDDB, or the operating system, though.
Regards,
Martin Is this a bug?
Yes.
But since the DB is opened read-only, perhaps close() is not so important?!?
--
Дамјан (jabberID:da****@bagra.net.mk)
A: Because it reverses the logical flow of converstion.
Q: Why is top posting frowned upon?
Harry> ... but if I change to read-only access (as in permissions on file): a = bsddb.btopen("c:/sharedrw/db/npanxx2pseudo.db", "r") a.close()
Harry> Traceback (most recent call last):
Harry> File "<pyshell#30>", line 1, in -toplevel-
Harry> a.close()
Harry> File "C:\Python23\lib\bsddb\__init__.py", line 101, in close
Harry> v = self.db.close()
Harry> DBPermissionsError: (1, 'Operation not permitted')
Harry> Performing a close() with read/write access with file opened "r" does
Harry> not change the last-modified time/date.
Harry> Is this a bug?
Dunno. Works for me on Mac OS X:
% python
Python 2.4a0 (#77, Aug 11 2003, 11:19:14)
[GCC 3.1 20020420 (prerelease)] on darwin
Type "help", "copyright", "credits" or "license" for more information. import bsddb db = bsddb.btopen("foo.bt", "c") db['1'] = '1' db.close()
% chmod 444 foo.bt
% python
Python 2.4a0 (#77, Aug 11 2003, 11:19:14)
[GCC 3.1 20020420 (prerelease)] on darwin
Type "help", "copyright", "credits" or "license" for more information. import bsddb db = bsddb.btopen("foo.bt", "r") db.close()
Skip This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: John D. |
last post by:
We are using OpenBSD latest release of Python (2.3), and want to use the "bsddb" module. Our python release has a directory called "bsddb", but when we try and import it, it says
>>> import...
|
by: Anthony McDonald |
last post by:
PythonWin 2.3 (#46, Jul 29 2003, 18:54:32) on
win32.
Portions Copyright 1994-2001 Mark Hammond (mhammond@skippinet.com.au) - see
'Help/About PythonWin' for further copyright information.
>>>...
|
by: Dfenestr8 |
last post by:
I started off trying to use bsddb with my standard mandrake 9 python 2.2.1
package. The shell reported back no such module. Strange, thinks I. I
thought it was standard in the package, it was when...
|
by: Michele Simionato |
last post by:
I was browsing through the source tree of Python 2.4b2 and in Lib/bsddb/test
I found a lot of interesting stuff. It seems that the support for the bsd
database is much better than documented in the...
|
by: jalil |
last post by:
I am using Python 2.4 and get this exception when running my mod_python
application. This used to work in my older environment.
Any ideas on how I can debug this issue?
-Jalil
Mod_python...
|
by: Neville C. Dempsey |
last post by:
#!/bin/env python
import bsddb
test=bsddb.btopen("test.tbl")
for m in "JFMATQPHSOND":
test="Profit for month "+m+" $1B"
def subyear_report(record_selection):
for data in...
|
by: Barry |
last post by:
I have python2.4.1 installed on two machines:
-- one is Fedora core 1, where the bsddb module works fine
-- one is Redhat ES 3.0, and I installed mysql 4.1 (and
mysql-python2.1) after putting the...
|
by: leasun |
last post by:
Anybody knows which version bsddb is released with py2.3 and py2.4?
Thanks.
|
by: Yi Qiang |
last post by:
Hi guys,
I am trying to compile python 2.5 on my OSX machine so it includes the
bsddb module. Currently, when I type 'import bsddb' I get the
following traceback:
...
|
by: cocobear |
last post by:
How to deal with multiple databases in an file. I want to get the
content of several databases.
it's the code I wrote:
$ python
Python 2.5.1 (r251:54863, Oct 30 2007, 13:54:11)
on linux2...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |