On Thu, Sep 6, 2012 at 10:07 PM, shaun wrote:
> Hi Chris,
>
> I'm changing it into multiple classes because the script is going to get
> much larger its more for maintainability reasons rather than functionality
> reasons.
Doesn't necessarily have to be multiple classes. Python gives you t
Hi Chris,
I'm changing it into multiple classes because the script is going to get
much larger its more for maintainability reasons rather than functionality
reasons.
Thanks so much man it was the "self" fix you stated above. I woe you a pint of
Guinness :D
Thanks again,
Shaun
--
http:/
On 06/09/2012 12:37, shaun wrote:
Sorry guys here is the full code for the class:
#!/usr/bin/python
# Echo client program
import cx_Oracle
import socket
import pprint
from struct import *
import sys
from binascii import *
Don't use "from something import *". It'll import a whole load of
names.
On Thu, Sep 6, 2012 at 9:37 PM, shaun wrote:
> class StringCall:
> results=[]
> def databasebatchcall(self,termid, batchid):
> con =
> cx_Oracle.connect('user/user...@odb4.dcc.company.ie/ODB4TEST.COMPANY.IE')
> cur = con.cursor()
> c
This is the code in the script im calling:
batchObject=StringCall()
batchObject.databasebatchcall(termid, batchid)
batchObject.fetchbatchdata()
batchObject.createbatchstrings()
BatchHeaderPacket =batchObject.returnbatchheader()
ParameterPacket =batchObject.returnparameterpacket()
TrailerPacket =
Sorry guys here is the full code for the class:
#!/usr/bin/python
# Echo client program
import cx_Oracle
import socket
import pprint
from struct import *
import sys
from binascii import *
import time
import datetime
class StringCall:
results=[]
def databasebatchcall(self,termid,
shaun wrote:
> I have a class which I create an object from in a different script but
when its run I get an error at the last part of this method:
> def databasebatchcall(self,tid, bid):
> con=cx_Oracle.connect(
> 'user/user...@odb4.dcc.company/ODB4TEST.COMPANY.COM')
> c
On 09/06/2012 06:45 AM, shaun wrote:
> Hi all,
>
> I have a class which I create an object from in a different script but when
> its run I get an error at the last part of this method:
>
> CODE///
>
> def databasebatchcall(self,tid, bid):
>
> con=cx_Oracle
On Thu, Sep 6, 2012 at 8:45 PM, shaun wrote:
> CODE///
>
> def databasebatchcall(self,tid, bid):
>
> con=cx_Oracle.connect('user/user...@odb4.dcc.company/ODB4TEST.COMPANY.COM')
> cur = con.cursor()
> cur.execute("SELECT * FROM name)
>
Hi all,
I have a class which I create an object from in a different script but when
its run I get an error at the last part of this method:
CODE///
def databasebatchcall(self,tid, bid):
con=cx_Oracle.connect('user/user...@odb4.dcc.company/ODB4TEST.COMPA
10 matches
Mail list logo