Suppose you have two file-trees with common sub-directories but
different files that you want to merge together, e.g.
/test/
/test/a/
/test/a/file1
/test2/
/test2/a/
/test2/a/file2
You can easily merge the directories in Linux using the "cp" command:
cp -r test/* test2/
While Python provides s
Hi John,
Thanks for the suggestions: I have finally been able to get it
working :)
In anyone else runs into the same problem, here is some example code
that works in Python 2.4+:
= Begin Example ==
#!/usr/bin/env python
#-*- coding:utf-8 -*-
import sys
def main():
Hello,
Thanks for the suggestions and information Diez!
On Nov 18, 9:38 am, "Diez B. Roggisch" wrote:
>
> You are aware that the coding-declaration only affects unicode-literals (the
> ones like u"i'm unicode")? So the above insert-statement is *not* unicode,
> it's a byte-string in whatever enc
Hi all,
I ran into a problem recently when trying to add support for earlier
versions of Python (2.4 and 2.5) to some database related code which
uses MySQLdb, and was wondering if anyone has any suggestions.
With later versions of Python (2.6), inserting Unicode is very simple,
e.g.:
# -*-
Thanks Fredrik.
That certainly explains things :) I also appreciate the suggestion on
coding guidelines: I'm
still becoming familiar with python. Originally we were not using the
database to store images,
but we started testing out storing images there as well as meta-data.
We may end up switching
Hi all,
I've run into a strange error while trying to store some PNG images in
a MySQL database using MySQLdb. When I try to insert smaller images (<
64kb or so) everything seems to work fine. When I start trying to
insert larger images (~150kb), however, the images get corrupted along
the way.
T
Thanks Gabriel!
That helps clear things up for me. The above method works very well. I
only have one remaining question:
How can I pass a datetime object to MySQL?'
So far, what I've been doing is building the query as a string, for
example:
query = "INSERT INTO image VALUES(%d, %d, %s, '%s')" %
On Jul 16, 11:16 am, Gary Herron <[EMAIL PROTECTED]> wrote:
> Keith Hughitt wrote:
> > Hi all,
>
> > I am using someone else's script which expects input in the form of:
>
> > ./script.py arg2
>
> > I was wondering if the angle-brackets here hav
Hi all,
I am using someone else's script which expects input in the form of:
./script.py arg2
I was wondering if the angle-brackets here have a special meaning? It
seems like
they specify an input and output stream to use in place of the
console. I could not
find anything in the python man
On Jul 12, 12:52 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> En Fri, 11 Jul 2008 15:42:37 -0300, Keith Hughitt
> <[EMAIL PROTECTED]> escribi�:
>
> > I am having a little trouble figuring out how to convert a python
> > datetime to UTC. I ha
Hi,
I am having a little trouble figuring out how to convert a python
datetime to UTC. I have a UTC date (e.g. 2008-07-11 00:00:00). I would
like to create a UTC date so that when I send it to MySQL (which
treats all dates at local dates by default), it will already have
incorporated the proper UT
On Jul 9, 10:18 am, Tim Golden <[EMAIL PROTECTED]> wrote:
> Keith Hughitt wrote:
> > I've been looking around on the web for a way to do this, but so far
> > have not come across anything for this particular application. I have
> > found some ways to enable ta
Hi all,
I've been looking around on the web for a way to do this, but so far
have not come across anything for this particular application. I have
found some ways to enable tab completion for program-related commands,
but not for system filepaths. This would be nice to have when
prompting the user
13 matches
Mail list logo