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: python-list@python.org
> Subject: global name is not defined
>
> I'm getting
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
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
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
"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.