<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE id=ridTitle>Blank</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<STYLE>BODY {
        MARGIN-TOP: 25px; FONT-SIZE: 10pt; MARGIN-LEFT: 25px; COLOR: #000000; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffffff
}
P.msoNormal {
        MARGIN-TOP: 0px; FONT-SIZE: 10pt; MARGIN-LEFT: 0px; COLOR: #ffffcc; FONT-FAMILY: Helvetica, "Times New Roman"
}
LI.msoNormal {
        MARGIN-TOP: 0px; FONT-SIZE: 10pt; MARGIN-LEFT: 0px; COLOR: #ffffcc; FONT-FAMILY: Helvetica, "Times New Roman"
}
</STYLE>
<META content="MSHTML 6.00.2800.1586" name=GENERATOR></HEAD>
<BODY id=ridBody
style="FONT-SIZE: 10pt; COLOR: #000000; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffffff"
bgColor=#ffffff background=cid:717572118@10022007-34DE>
<P><SPAN class=717572118-10022007>Hi,</SPAN></P>
<P><SPAN class=717572118-10022007>I read the information at <A
href="http://mail.python.org/mailman/listinfo/tutor">http://mail.python.org/mailman/listinfo/tutor</A> but
am still not sure how to properly send a question. Will I get an email
response without joining the list? </SPAN></P>
<P><SPAN class=717572118-10022007>Thanks for any help.</SPAN></P>
<P><SPAN class=717572118-10022007>Les</SPAN></P>
<P><SPAN class=717572118-10022007></SPAN> </P>
<P><SPAN class=717572118-10022007>I thought when I read the 2002 thread
with the subject (Creating an Identifier or Object Name from a String?),
that I had found a solution to my problem. But, I can't make the concept
work for creating an object identifier. </SPAN></P>
<P><SPAN class=717572118-10022007>THIS WORKS</SPAN></P>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<P><SPAN class=717572118-10022007>class nsf(object):<BR> #
name = ''<BR> def __init__(self,
id):<BR> self.name = id
<BR> <BR># main<BR>Ireland = nsf('Ireland')</SPAN></P></BLOCKQUOTE>
<P><SPAN class=717572118-10022007>BUT - THIS DOESN'T</SPAN></P>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<P><SPAN class=717572118-10022007>class nsf(object):<BR> #
name = ''<BR> def __init__(self,
id):<BR> self.name = id
<BR> <BR># main<BR>cmdstr = "Ireland =
nsf('Ireland')"<BR>eval(cmdstr)</SPAN></P></BLOCKQUOTE>
<P><SPAN class=717572118-10022007>-------------------------</SPAN></P>
<P><SPAN class=717572118-10022007>I get an error saying the following</SPAN></P>
<P><SPAN class=717572118-10022007><FONT
face=Courier> eval(cmdstr)<BR> File
"(string)", line 1<BR> Ireland =
nsf('Ireland')<BR>
^<BR>SyntaxError: invalid
syntax</FONT></SPAN></P>
<P><SPAN class=717572118-10022007>-------------------------</SPAN></P>
<P><SPAN class=717572118-10022007>For reference the thread message that I am
referring to is:</SPAN></P>
<P><SPAN class=717572118-10022007>Gregor Lingl wrote:</SPAN></P>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<P dir=ltr style="MARGIN-RIGHT: 0px"><SPAN class=717572118-10022007>I Tried it
and it worked (?!)<BR><BR>Python 2.2c1 (#27, Dec 14 2001, 13:15:16) [MSC 32
bit (Intel)] on win32<BR>Type "copyright", "credits" or "license" for more
information.<BR>IDLE 0.8 -- press F1 for help<BR>>>><I> class
K:<BR></I>
pass<BR><BR>>>><I> field1 = K()<BR></I>>>><I> field2 =
K()<BR></I>>>><I> field3 = K()<BR></I>>>><I> for ct in
range(1,4):<BR></I>
obj="field"+str(ct)<BR>
objTC=eval(obj)<BR>
objTC.text=['a','b',str(ct)]<BR><BR><BR>>>><I>
field1.text<BR></I>['a', 'b', '1']<BR>>>><I> field2.text<BR></I>['a',
'b', '2']<BR>>>><I> field3.text<BR></I>['a', 'b',
'3']<BR>>>><I><BR></I><BR>Gregor<BR><BR></SPAN><SPAN
class=717572118-10022007></SPAN></P></BLOCKQUOTE>
<P dir=ltr style="MARGIN-RIGHT: 0px"><SPAN class=717572118-10022007>What he did
also works for me. Bur, </SPAN><SPAN class=717572118-10022007>I have tried many
ways to use the same idea for creating an object identifier. I haven't
found a way yet.</SPAN></P>
<P dir=ltr style="MARGIN-RIGHT: 0px"><SPAN
class=717572118-10022007></SPAN> </P>
<P dir=ltr style="MARGIN-RIGHT: 0px"><SPAN class=717572118-10022007> </P>
<DIV dir=ltr style="MARGIN-RIGHT: 0px"></SPAN> </DIV>
<DIV><P><HR>
The information contained in this communication may be CONFIDENTIAL and is intended only for the use of the recipient(s) named above. If you are not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication, or any of its contents, is strictly prohibited. If you have received this communication in error, please notify the sender and delete/destroy the original message and any copy of it from your computer or paper files.
</P></DIV>
</BODY></HTML>