Re: Cursors in a Loop

2008-01-03 Thread t_rectenwald
On Jan 3, 7:47 pm, t_rectenwald <[EMAIL PROTECTED]> wrote: > I have a python script that uses the cx_Oracle module.  I have a list > of values that I iterate through via a for loop and then insert into > the database.  This works okay, but I'm not sure whether I can use

Cursors in a Loop

2008-01-03 Thread t_rectenwald
I have a python script that uses the cx_Oracle module. I have a list of values that I iterate through via a for loop and then insert into the database. This works okay, but I'm not sure whether I can use one cursor for all inserts, and define it outside of the loop, or instantiate and close the c

Re: Strange Behavior: csv module & IDLE

2007-12-28 Thread t_rectenwald
On Dec 28, 9:43 pm, John Machin <[EMAIL PROTECTED]> wrote: > On Dec 29, 1:12 pm, t_rectenwald <[EMAIL PROTECTED]> wrote: > > > I've noticed an oddity when running a program, using the csv module, > > within IDLE.  I'm new to Python so am confused by what

Strange Behavior: csv module & IDLE

2007-12-28 Thread t_rectenwald
I've noticed an oddity when running a program, using the csv module, within IDLE. I'm new to Python so am confused by what is happening. Here is what I'm doing: 1) Open the IDLE Shell. 2) Select File | Open... 3) Choose my file, foo.py, opening it in a window. 4) From that window, I hit F5 to run

Re: Writing Oracle Output to a File

2007-12-26 Thread t_rectenwald
On Dec 26, 12:10 pm, t_rectenwald <[EMAIL PROTECTED]> wrote: > On Dec 26, 12:06 pm, Paul Hankin <[EMAIL PROTECTED]> wrote: > > > > > > > On Dec 26, 4:51 pm, t_rectenwald <[EMAIL PROTECTED]> wrote: > > > > On Dec 26, 10:36 am, t_rectenwald &

Re: Writing Oracle Output to a File

2007-12-26 Thread t_rectenwald
On Dec 26, 12:06 pm, Paul Hankin <[EMAIL PROTECTED]> wrote: > On Dec 26, 4:51 pm, t_rectenwald <[EMAIL PROTECTED]> wrote: > > > > > > > On Dec 26, 10:36 am, t_rectenwald <[EMAIL PROTECTED]> wrote: > > > > Hello, > > > > I attempting

Re: Writing Oracle Output to a File

2007-12-26 Thread t_rectenwald
On Dec 26, 10:36 am, t_rectenwald <[EMAIL PROTECTED]> wrote: > Hello, > > I attempting to execute an Oracle query, and write the results to a > file in CSV format.  To do so, I've done the following: > > import cx_Oracle > db = cx_Oracle.connect('user/[EM

Writing Oracle Output to a File

2007-12-26 Thread t_rectenwald
Hello, I attempting to execute an Oracle query, and write the results to a file in CSV format. To do so, I've done the following: import cx_Oracle db = cx_Oracle.connect('user/[EMAIL PROTECTED]') cursor = db.cursor() cursor.arraysize = 500 cursor.execute(sql) result = cursor.fetchall() The abov