on is at :
> > http://stackoverflow.com/questions/18627608/nameerror-global-name-is-not-defined-but-differences
> >
> > Before answering, Thank you for your attention...!
> >
> >
> > Yours,
> > Mohsen
> >
> >
>
> Please don't just po
On 9/5/2013 1:38 AM, Benjamin Kaplan wrote:
On Wed, Sep 4, 2013 at 9:17 PM, Mohsen Pahlevanzadeh
wrote:
i get the error :
NameError: global name 'ui' is not defined
Complete question is at :
http://stackoverflow.com/questions/18627608/nameerror-global-name-is-not-defined-but-d
On Wed, Sep 4, 2013 at 9:17 PM, Mohsen Pahlevanzadeh
wrote:
> Dear all ,
>
> i get the error :
>
> NameError: global name 'ui' is not defined
>
> Complete question is at :
> http://stackoverflow.com/questions/18627608/nameerror-global-name-is-not-defined-bu
Dear all ,
i get the error :
NameError: global name 'ui' is not defined
Complete question is at :
http://stackoverflow.com/questions/18627608/nameerror-global-name-is-not-defined-but-differences
Before answering, Thank you for your attention...!
Yours,
Mohsen
--
https://mail.
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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/ODB4TEST.COMPA
Thanks, seems to be fixed with importing MySQLdb, menus, EMR_main, etc
in the Name_find module. Is there a better way to do things? I
thought I was avoiding using global variables by putting the shared
ones in their own module.
Thanks for the help.
Mike
--
http://mail.python.org/mailman/listi
Looks like you forgot to import EMR_globals, EMR_main, etc.
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> ] On Behalf Of barronmo
> Sent: Tuesday, November 06, 2007 2:57 PM
> To: [email protected]
> Subject: global name is not def
En Tue, 06 Nov 2007 18:57:12 -0300, barronmo <[EMAIL PROTECTED]> escribió:
> I'm getting an error msg I don't understand, "global name EMR_globals
> is not defined", and could use some help.
>
> I've separated the application I'm building into several modules. One
> of the modules holds variables
I'm getting an error msg I don't understand, "global name EMR_globals
is not defined", and could use some help.
I've separated the application I'm building into several modules. One
of the modules holds variables I need to pass from one module to
another and is called 'EMR_globals'. Several othe
thanks! that fixed it :)
--
http://mail.python.org/mailman/listinfo/python-list
On 9/21/07, Mridula Ramesh <[EMAIL PROTECTED]> wrote:
> hi.
>
> i'm a beginner and i'm trying to get the hang of classes and functions. my
> code looks like this:
>
>
>
> class showRecord(main):
> def __init__(self):
> global gmax
> #now to create the screen by placing all the
hi.
i'm a beginner and i'm trying to get the hang of classes and functions. my
code looks like this:
class showRecord(main):
def __init__(self):
global gmax
#now to create the screen by placing all the widgets
rt = Tk()
showbuttons()
#call the scrolle
i changed it to append and it started working but once in a while
i m getting
l_code.append( len(d_list_code[i]['entries']) )
IndexError: list index out of range
but it is not permanent if i refresh, it goes away!
Marco Wahl wrote:
> "a" <[EMAIL PROTECTED]> writes:
>
> > What I want
> > --
a wrote:
> What I want
> ---
> I want to create a list of items from a function operating on an array
> of strings
def func(s):
return s.upper()
arrayOfStrings = ['bicycle', 'repair', 'man']
print "solution 1: with map()"
print map(func, arrayOfStrings)
print "solution 2: with list
a wrote:
> def fn():
> for i in range(l)
>global count
>count[i]=
>
> how do i declare count to be global if it is an array
>
> subsequently i should access or define count as an array
>
> error:
> global name 'count' is not defined
>
The questions you are aski
"a" <[EMAIL PROTECTED]> wrote:
> def fn():
> for i in range(l)
> global count
> count[i]=
>
> how do i declare count to be global if it is an array
a couple of notes:
1) global statements should be placed at the top of the function
2) objects don't appear out of now
def fn():
for i in range(l)
global count
count[i]=
how do i declare count to be global if it is an array
subsequently i should access or define count as an array
error:
global name 'count' is not defined
thanks
-a
--
http://mail.python.org/mailman/listinfo/pyt
"a" <[EMAIL PROTECTED]> writes:
> What I want
> ---
> I want to create a list of items from a function operating on an array
> of strings
Ok.
> What I did
> -
> list=["s0","s1","s2"]
> l=len(list)
> for i in range(l):
> d_list[i]=f.
What I want
---
I want to create a list of items from a function operating on an array
of strings
What I did
-
list=["s0","s1","s2"]
l=len(list)
for i in range(l):
d_list[i]=f.do(list[i])
print d_l
28 matches
Mail list logo