Re: [Tutor] Convert string to variable name

2005-01-27 Thread Liam Clarke
I've used something along the lines for Pythoncard, but the names are generated within strict rules and expectations. i.e. first off รข #Some code that uses regExs, finds all headings, and # a asterisk to indicate a date value, returns a iterable object reHead using finditer() #which contai

Re: [Tutor] Convert string to variable name

2005-01-27 Thread Alan Gauld
> This is something I've been trying to figure out for some time. Is > there a way in Python to take a string [say something from a > raw_input] and make that string a variable name? I want to to this so > that I can create class instances on-the-fly, using a user-entered > string as the instance

Re: [Tutor] Convert string to variable name

2005-01-26 Thread Tony Giunta
On Wed, 26 Jan 2005 17:11:59 -0800 (PST), Danny Yoo <[EMAIL PROTECTED]> wrote: > > > On Wed, 26 Jan 2005, Tony Giunta wrote: > > We can use exec() to create dynamic variable names, but it's almost always > a bad idea. Dynamic variable names make it very difficult to isolate > where variables a

Re: [Tutor] Convert string to variable name

2005-01-26 Thread Danny Yoo
On Wed, 26 Jan 2005, Tony Giunta wrote: > This is something I've been trying to figure out for some time. Is > there a way in Python to take a string [say something from a raw_input] > and make that string a variable name? Hi Tony, Conceptually, yes: you can collect all those on-the-fly vari

[Tutor] Convert string to variable name

2005-01-26 Thread Tony Giunta
Hello tutors, This is something I've been trying to figure out for some time. Is there a way in Python to take a string [say something from a raw_input] and make that string a variable name? I want to to this so that I can create class instances on-the-fly, using a user-entered string as the ins