GHUM wrote:
>>One side effect of this being third party code is that hosting
>>services may not have it available, even when they have both Python
>>and MySQL up. This is never a problem with Perl or PHP, so that's
>>a negative for Python.
>
>
> I for one think it is a good thing to not have
> One side effect of this being third party code is that hosting
> services may not have it available, even when they have both Python
> and MySQL up. This is never a problem with Perl or PHP, so that's
> a negative for Python.
I for one think it is a good thing to not have MySQL adapters
int
dyork wrote:
> "Carsten Haese" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > This may come as a shock to you, but MySQL is not the only database
> > engine on the planet. Your recommendation may apply to MySQL, but it is
> > not true for all databases in general. I can name at
dyork wrote:
> "Dennis Lee Bieber" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
> > If you actually look at what the various DB-API adapters produce
> > when sending to the database engine, floats, bools, etc. are all sent as
> > string representations; about the only source for
>
> The advantage of static typing in this context is that the variable still
> holds the type even if the value happens to be null. Any value that has been
> exposed to user input comes back as a string and has to be validated and
> converted to the correct data type. Static typing provides a
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> if you think that Python isn't typed, you've completely missed how things
> work. your problem is that you're removing every trace of the type
> information by casting everything to strings, not that Python itself (n
"John Nagle" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>Actually, MySQLdb isn't released for Python 2.5 yet, so for
> anything with a database, you need an older version of Python.
It's not really a problem so far.
>If you really want to change the conversions for TIMES
"Dennis Lee Bieber" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> If you actually look at what the various DB-API adapters produce
> when sending to the database engine, floats, bools, etc. are all sent as
> string representations; about the only source for problems would be
> in
"Carsten Haese" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> This may come as a shock to you, but MySQL is not the only database
> engine on the planet. Your recommendation may apply to MySQL, but it is
> not true for all databases in general. I can name at least two examples
> (I
"Carsten Haese" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Python is a typed language, too, and "this thing" works just fine,
> provided that you are using a reasonable DB-API implementation, and
> provided that you're actually binding objects as parameters instead of
> just st
"fumanchu" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Here's the web adaptation layer I use:
> http://projects.amor.org/misc/browser/alamode.py
> Have a look at the coerce_in and coerce_out functions.
Thanks! Plenty of useful ideas there.
My web framework already does all the
Am Sat, 16 Dec 2006 16:31:18 -0500 schrieb Carsten Haese:
>
> This may come as a shock to you, but MySQL is not the only database
> engine on the planet. Your recommendation may apply to MySQL, but it is
> not true for all databases in general. I can name at least two examples
> (Informix and Ora
dyork wrote:
> Most values tend to work, but only because the SQL string representation
> happens to be the same as the Python representation. That may not apply to
> some float values, bool, perhaps others. I had hoped the tools would have
> solved those problems so I don't have to. In typed l
>
> Most values tend to work, but only because the SQL string representation
> happens to be the same as the Python representation. That may not apply to
> some float values, bool, perhaps others. I had hoped the tools would have
> solved those problems so I don't have to. In typed languages (J
Carsten Haese wrote:
> On Sat, 2006-12-16 at 20:48 +, John Nagle wrote:
> > The SourceForge page
> >
> >http://sourceforge.net/project/showfiles.php?group_id=22307
> >
> > says
> >
> > "MySQL versions 3.23-5.0; and Python versions 2.3-2.4 are supported."
> >
> > Last release was A
On Sat, 2006-12-16 at 20:48 +, John Nagle wrote:
> The SourceForge page
>
>http://sourceforge.net/project/showfiles.php?group_id=22307
>
> says
>
> "MySQL versions 3.23-5.0; and Python versions 2.3-2.4 are supported."
>
> Last release was April, 2006. There's no binary for Pyt
Marc 'BlackJack' Rintsch wrote:
> In <[EMAIL PROTECTED]>, John Nagle wrote:
>
>>John Machin wrote:
>>
>>>John Nagle wrote:
>>>
dyork wrote:
>"John Machin" <[EMAIL PROTECTED]> wrote in message
>news:[EMAIL PROTECTED]
>
>
>
>>If you have, as you should, Python 2.5, y
In <[EMAIL PROTECTED]>, John Nagle wrote:
> John Machin wrote:
>> John Nagle wrote:
>>>dyork wrote:
"John Machin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>If you have, as you should, Python 2.5, you can use this:
>>>
>>>Actually, MySQLdb isn't released
John Machin wrote:
> John Nagle wrote:
>
>>dyork wrote:
>>
>>>"John Machin" <[EMAIL PROTECTED]> wrote in message
>>>news:[EMAIL PROTECTED]
>>>
>>>
If you have, as you should, Python 2.5, you can use this:
>>
>>Actually, MySQLdb isn't released for Python 2.5 yet
>
>
> Actually, that's int
dyork wrote:
> Thanks Gabriel, but when I said "round trip" I really did mean: convert all
> the way to string and all the way back again, so your kind advice is not all
> that helpful. I need string to get to a non-Python object or a Web page.
Then you need two adaptation layers: one between your
John Nagle wrote:
> dyork wrote:
> > "John Machin" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> >
> >>If you have, as you should, Python 2.5, you can use this:
>
> Actually, MySQLdb isn't released for Python 2.5 yet
Actually, that's interesting information [why should it
John Nagle wrote:
> Routinely converting MySQL DATETIME objects to Python "datetime"
> objects isn't really appropriate, because the MySQL objects have a
> year range from 1000 to , while Python only has the UNIX range
> of 1970 to 2038.
You're mistaken. Python datetime module excepts year
dyork wrote:
> "John Machin" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> I was looking for a constructor that was the complement of str(). Most/many
> languages would provide that. Sometimes it's called parse().
>
>
>>The constructor is datetime.datetime(year, ., second)
dyork wrote:
> When getting data from a database using the dbapi and an SQL query, how do
> you in general round trip the data? Especially date-time?
>
This is what I do. I am posting this partly because I hope it helps,
partly because it is a bit clunky and I would appreciate suggestions
for imp
On Sat, 2006-12-16 at 04:27 +, dyork wrote:
> "John Machin" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > I suppose it all depends on your definition of obvious :-)
> I was looking for a constructor that was the complement of str(). Most/many
> languages would provide that
"John Machin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I suppose it all depends on your definition of obvious :-)
I was looking for a constructor that was the complement of str(). Most/many
languages would provide that. Sometimes it's called parse().
> The constructor is da
Thanks Gabriel, but when I said "round trip" I really did mean: convert all
the way to string and all the way back again, so your kind advice is not all
that helpful. I need string to get to a non-Python object or a Web page.
DY
"Gabriel Genellina" <[EMAIL PROTECTED]> wrote in message
news:[EM
dyork wrote:
> When getting data from a database using the dbapi and an SQL query, how do
> you in general round trip the data? Especially date-time?
>
> An SQL datetime column translates nicely into a Python datetime (surprise),
> which then translates into a string like '2005-08-03 07:32:48'.
It
On 15 dic, 07:44, "dyork" wrote:
> When getting data from a database using the dbapi and an SQL query, how do
> you in general round trip the data? Especially date-time?
>
> An SQL datetime column translates nicely into a Python datetime (surprise),
> which then translates into a string like '2005
29 matches
Mail list logo