Hello,
I need some buffers, which are beeing concatenated an then send via
the socket() function.
My problem is that create_string_buffer() creates a buffer which ist
one byte too long (for a \0 char). But when I concatenate some of
these buffers to a long one to be transfered, the extra byte
I have a strange unicode problem with mySQL and sqlite.
In my application I get a table as a sqlite table which is being compared to an
existing mySQL Table.
The sqlite drive returns all strings from the table as a unicode string which
is Ok.
The mysql drive returns all strings as utf-8 coded
I have a strange unicode problem with mySQL and sqlite.
In my application I get a table as a sqlite table which is being compared to an
existing mySQL Table.
The sqlite drive returns all strings from the table as a unicode string which
is Ok.
The mysql drive returns all strings as utf-8 coded
I found the bug, it's in the mysql module.
When a column has COLLATE=utf8_bin set,
the column is NOT returned as unicode.
It's a known bug #541198
Thanks all for reading.
Greetings
Hans
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
I have some programs doing a lot sql IO in some mySQL databases.
This works very fine and the DBAPI is quite simple to understand.
Now I came to the point where I had to insert millions of lines into a table.
My first aproach was to insert the data using executemany().
That's not bad and
Hello,
I have a lot of items having a name and a given sequence.
To access these items fast in a sequence order they should be used as
a list, but to be fetched fast by name they also should be in a
dictionary.
Code could be something like this.
class item
def __init__(name,
Diez B. Roggisch wrote:
Hans Müller wrote:
Hello,
I have a lot of items having a name and a given sequence.
To access these items fast in a sequence order they should be used as
a list, but to be fetched fast by name they also should be in a
dictionary.
Code could be something like
Hello,
I'd like to play a little with named pipes on windows.
For this purpose google told me there is a win32pipe module.
My python2.6 on windows doesn't know it - so where can I get ?
Does it belong to the std. python for windows or is it a separate
package ?
Thank a lot,
Hans
--
Here we have to select between wxPython and PyQt for a medium size project.
In this project several hundred dialogs are to be created. This work will be
done by a
program generator which has to re-written.
The question now is which framework should we use.
As far as I could found is PyQt with
Thanks for all your informative replies.
If I understand you right, for a commercial, closed source program I
only need a commercial PyQt license for ~ 500€ ?
As far as I know I also need a Qt Licenses which is ~3500€ per OS.
What is right ?
Thanks a lot,
Hans
--
Hello,
I found a timing problem while playing with the xmlrpx stuff.
I created a very simple server, running on a network node on windows.
The client runs on windows or linux. It runs a very simple test function on the
server
which just echos a passed string. The trip time is beeing measured.
Small addition:
While tracing the network data I found the server to be the problem,
the answer to a request is beeing delayed by about 180ms - no idea why.
--
http://mail.python.org/mailman/listinfo/python-list
Another addendum...
while running again the server code on a linux host,
the times are as expected.
started...
Checking with 100240
time for 10 loops: 2.844000
Checking with 10240
time for 10 loops: 0.39
Checking with 1024
time for 10 loops: 0.078000
Checking with 512
time for 10 loops:
Richard,
thanks a lot for your hint, that was completely new for me.
Nagle's optimisation is definitely a good idea in most cases.
By the way, do you have an idea how to access the underlying socket to modify
the behavier
via the setsockopt function to disable Nagle's algorythm in my special
Hello experts,
I'm looking for secure way to pass messages from a python program to a
c-library in both ways.
This scenario is given:
display client Calculation module in
COBOL (yes, big, old but it works well)
(python, wxpython) - Network
Hi python experts,
in the moment I'm struggling with an annoying problem in conjunction with mysql.
I'm fetching rows from a database, which the mysql drive returns as a list of
tuples.
The default coding of the database is utf-8.
Unfortunately in the database there are rows with different
Thanks Peter,
your answer did the trick.
I programed a lot with awk (also a very cool scripting language).
So I was focused on the concept a dictionary key has to be string
(as in awk). Since it's impossible to use a list as a dictionary
key I thought it's also impossible to use a tuple as a key.
Hello,
I'm quite often using this construct:
for l in open(file, r):
do something
here, l contains the \n or \r\n on windows at the end.
I get rid of it this way:
for l in open(file, r):
while l[-1] in \r\n:
l = l[:-1]
I find this a little bit clumsy, but it
Hello group,
I have some scripts sharing some common functions.
So what I'd like to have is a modern include.
Of course python does not have (with good reasons) no include statement.
But I'm too lazy to create a module which has to be installed into the
interpreter for some functions I need to
Thanks a lot,
you made my day.
As often in python, it's really simple and useful !
Greetings
Hans
--
http://mail.python.org/mailman/listinfo/python-list
Sorry, I found the mistake:
There is more than one blob type, blob as a default stores only 64k of data.
LONGBLOB has a 4G limit which is Ok for my purposes.
Happy Christmas to all,
Hans
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
thanks a lot for the Binary(). This does the trick, now I can import all my
binary data.
But now I found the next problem:
The Blob is now limited to 65535 Bytes. I love all these stone age (16bit)
limits on my 64bit machines...
All bigger files a truncated.
Has someone an idea how to
Good morning folks,
I cannot read a binary file into a mysql database. Everything I tried did not
succeed.
What I tried (found from various google lookups...) is this:
con = MySQLdb.connect(to server)
cur = con.cursor()
cur.execute(insert into data values('file1', %s), (open(test.jpg,
Hi,
I'd like to modify some tables in a database in one transaction.
This approach doesn't work:
import MySQLdb
con = MySQLdb.connect(servernam, user = username, passwd = verysecret, db
= test, use_unicode = True, charset = utf8)
cursor = con.cursor()
con.begin()
cursor.execute(delete from
24 matches
Mail list logo