Nice Find!
On Sun, 2006-09-10 at 08:50 +0100, Alan Gauld wrote:
> "Chris Hengge" <[EMAIL PROTECTED]> wrote
> > Simple command to clear console? (C++ was something like
> > system.clr())
> > Some sort of cursor positioning? (C++ was something like gotoxy)
>
> While looking for something else I st
Bob and Alan,
Thanks for the help. I have gone with the following code and it works!
a = "date(%i,%i,%i)" % (2006,01,31)
b = "date(%i,%i,%i)" % (2006,12,31)
sql = 'SELECT * FROM times where rt_weekst >= %s and rt_weekst <= %s and
rt_type = "%s" ' % (a,b,"R",)
db = mx.ODBC.Windows.DriverConnect('
John CORRY wrote:
> Hi All,
>
> I am using the code below to select items from a visual foxpro database
> where the dates are between the 31/01/2006 and 31/12/2006. The good
> news is that the code below works.
>
> However, I want to make the from and to dates variable. I want to
> change the ran
yves wrote:
> Kent Johnson a écrit :
>
> Hello,
>
>> Try it like this, using os.fdopen() to convert the low-level file handle
>> from mkstemp() to a Python file object:
>>
>> In [21]: fd, fname = tempfile.mkstemp()
>>
>> In [22]: f = os.fdopen(fd, 'w')
>>
>> In [23]: f.write('foo')
>>
>> In [24]
> a = datetime.date(2006,01,31)
> b = datetime.date(2006,12,31)
> c = str(a)
> d = str(b)
I'm not sure what format your data base expects for dates
but given you used the SQL date function before I'd go for
that again. Just pass the string equivalent of your dates
into the SQL date function. You p
Kent Johnson a écrit :
Hello,
> Try it like this, using os.fdopen() to convert the low-level file handle
> from mkstemp() to a Python file object:
>
> In [21]: fd, fname = tempfile.mkstemp()
>
> In [22]: f = os.fdopen(fd, 'w')
>
> In [23]: f.write('foo')
>
> In [24]: f.close()
>
> In [25]:
Alan,
Thanks for the help. I have converted the dates to strings but I get
the same error. Please see the updated code below, is this what you
meant by converting the dates to strings?
import mx.ODBC
import mx.ODBC.Windows
import mx.DateTime
import datetime
a = datetime.date(2006,01,31)
b = dat
LL wrote:
> Hi... I sent a question about an apparent error with writelines. I
> discovered my error (not closing the file correctly). Please don't
> post my question.
>
Oops, I didn't read this e-mail before I sent my reply to your other e-mail.
:).
hope that it helps you anyway.
Also, wheneve
LL wrote:
> Hi All,
>
> I have a list containing 108 filenames. I want to open each file and
> write it to an output file, appending it to the previous write. I use
> the code below. Everything appears to work fine until I reach file
> 107. Only part of the file is written, and file 108 is not
"Chris Hengge" <[EMAIL PROTECTED]> wrote
> Simple command to clear console? (C++ was something like
> system.clr())
> Some sort of cursor positioning? (C++ was something like gotoxy)
While looking for something else I stumbled across this module in
the Vaults of Parnassus: WConio
http://newcentu
10 matches
Mail list logo