Hi,
Just a quick query. I want to store dates and work with them in my
SQLite database.
There's no specific need for any calculations to done on one side or
another (i.e. it's a single user database).
I googled how to work with dates in SQL, and I got one like this -
SELECT * FROM totp
WHERE w
I don't know why this isn't working for you but this worked for me at a DOS
console:
>>> s='850hPa±'
>>> s
'850hPa\xf1'
>>> import re
>>> re.sub('\xf1', '*', s)
'850hPa*'
>>> import sys
>>> sys.stdout.encoding
'cp437'
and also in IDLE with a different encoding:
>>> s='850hPa±'
>>> s
'850hPa\
On Mar 24, 2005, at 6:01 AM, C Smith <[EMAIL PROTECTED]> wrote:
What follows is an attempt based on the previous tutor-evolved sieve
that extends the range in which to find the next prime by a factor of
2 over the last known prime. A similar algorithm is on ASPN (I
bellieve), under
Space-efficient
Liam Clarke wrote:
And then there's the overall question -
What would be the least fiddly & least error prone way of working with
dates and times? Python or SQL?
Liam, SQL is another language. You need to learn it like you are
learning Python. It has pretty decent support for dates and times as
p
John Miller wrote:
How does one actually use this module? For example:
>>> import eratosthenes
>>> eratosthenes.primes()
>>> eratosthenes.primes().next()
2
>>> eratosthenes.primes().next()
2
>>> eratosthenes.primes().next()
2
How does one get beyond the first prime?
it = eratosthenes.primes()
Is there any material anyone knows about how to use
pure python without pygame to write games ? The
reason for asking, is that although pygame is good it
has the disadvantage of that your users must have
pygame. It is also harder to create a stand alone
.exe with python ?
Send instant messages t
David Holland wrote:
Is there any material anyone knows about how to use
pure python without pygame to write games ? The
reason for asking, is that although pygame is good it
has the disadvantage of that your users must have
pygame. It is also harder to create a stand alone
.exe with python ?
Wha
David Holland wrote:
Is there any material anyone knows about how to use
pure python without pygame to write games ? The
reason for asking, is that although pygame is good it
has the disadvantage of that your users must have
pygame. It is also harder to create a stand alone
.exe with python ?
Why
Kent Johnson wrote:
jrlen balane wrote:
basically, i'm going to create a list with 96 members but with only
one value:
is there a shorter way to write this one???
[1] * 96
Just a note on this ---
This will work fine for immutable types (such as integers or strings).
But you can get into trouble i
Just a quick query. I want to store dates and work with them in my
SQLite database.
There's no specific need for any calculations to done on one side or
another (i.e. it's a single user database).
I googled how to work with dates in SQL, and I got one like this -
SELECT * FROM totp
WHERE wk BETWEEN
Lee Harr wrote:
I have heard a lot of really good things about SQLObject:
http://sqlobject.org/
However, that requires a more full-featured database, like postgresql.
According to the docs SQLObject supports SQLite:
http://sqlobject.org/docs/SQLObject.html#requirements
Kent
Hi all, I am working a simple function
and want it return a
a float
a list
and a dictionary
But it seems that I can only use
return once in the function
cant see to figure out why I can return more than once?
Thanks for the help!
--
#!/usr/
gerardo arnaez wrote:
Hi all, I am working a simple function
and want it return a
a float
a list
and a dictionary
But it seems that I can only use
return once in the function
cant see to figure out why I can return more than once?
Thanks for the help!
'return' does two things - it specifies what
Hi Kent,
> Most databases have a DATE type and you can directly store and retrieve date
> objects. Looking at the
> pysqlite code I see it uses mxDateTime for date support - it doesn't use the
> Python datetime module.
>
> So the first step is to install mxDateTime from
> http://www.egenix.c
I have heard a lot of really good things about SQLObject:
http://sqlobject.org/
However, that requires a more full-featured database, like postgresql.
According to the docs SQLObject supports SQLite:
http://sqlobject.org/docs/SQLObject.html#requirements
Wups. I even looked at that page before post
Try this.
import sys
def my_raw_input(prompt):
sys.stdout.write(prompt)## Since they're thinking of bonking off
print as well.
a = sys.stdin.readline()
if a.startswith(prompt):
return a[:len(prompt)]
return a
It leaves the '\n' on the end... so it sucks.
I know there is
Hello,
I am a newbee in python and trying to make a small script for my school
project . I try to run a python cgi script from another phyton script
as a result of an action . What is the neccesary command for this action
and is there a special class have to be imported for this command.
below
17 matches
Mail list logo