Hi,
Have a problem using shelve on windows and unix. While my windows box
supports dbhash, my unix box supports gdbm, and neither supports what the
other does. The problem arises when I try to use the shelve generated in
unix on my windows box.
Hoepfully there are alternatives to installing th
Hi,
What do I need to do to make the code below work as expected:
class str2(str):
def __setitem__(self, i, y):
assert type(y) is str
assert type(i) is int
assert i < len(self)
self = self[:i] + y + self[1+i:]
a = str2('1
Steven D'Aprano <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
> On Thu, 23 Nov 2006 10:48:32 +0000, Tor Erik Soenvisen wrote:
>
>> Hi,
>>
>>
>> (len(['']) is 1) == (len(['']) == 1) => True
>
> You shouldn'
Hi,
(len(['']) is 1) == (len(['']) == 1) => True
Is this the case for all numbers? I've tried running the following:
for i in range(1):
for j in range(1):
if i != j:
assert id(i) != id(j), 'i=%d, j=%d, id=%d' % (i, j, id
(i))
which execut
ester.
Here is the server code, HTTPServer.py:
# Basic, threaded HTTP server, serving requests via python scripts
# Author: Tor Erik Soenvisen
# Std lib imports
import BaseHTTPServer, os, threading, Queue
class HTTPServer(BaseHTTPServer.HTTPServer):
""" A threaded HTTP serve
Hi,
How safe is the following code against SQL injection:
# Get user privilege
digest = sha.new(pw).hexdigest()
# Protect against SQL injection by escaping quotes
uname = uname.replace("'", "''")
sql = 'SELECT privilege FROM staff WHERE ' + \
Hi,
Anyone know about existing code supporting FTP over SSL?
I guess pycurl http://pycurl.sourceforge.net/ could be used, but that
requires knowledge of libcurl, which I haven't.
regards
--
http://mail.python.org/mailman/listinfo/python-list
try:
self.cursor.execute(sql)
except AttributeError, e:
if e.message == "oracleDB instance has no attribute 'cursor'":
e.message = 'oracleDB.open() must be called before' + \
' oracleDB.query()'
raise At
Hi,
I need to export an Oracle database to a DDL-formated file. On the Web, I
found a Python script that did exactly this for a MS Access database, but
not one for Oracle databases.
Does anyone know of such a tool or Python script.
regards tores
--
http://mail.python.org/mailman/listinfo/pytho