Re: [Tutor] instantiate and name a class from / with a string

2019-08-09 Thread ingo
On 10-8-2019 05:57, Mats Wichmann wrote: > Please be more precise. We're not trying to be argumentative; you have > to help us know enough before we can help you. > Mats, Bob, sorry for not being clear. I have the string and want to create the instances. Bob's name = # get from data base seta

Re: [Tutor] instantiate and name a class from / with a string

2019-08-09 Thread Mats Wichmann
On 8/9/19 11:55 AM, ingo wrote: > With the available classes Root, Channel and SSE I build the following > (in CherryPy): > > root = Root() > root.channel = Channel() > > root.channel.weather = SSE('weather') > root.channel.energy = SSE('energy') > root.channel.mail = SSE('mail') > root.channel.r

Re: [Tutor] Object creation query

2019-08-09 Thread bob gailer
On 8/9/2019 7:39 AM, Alan Gauld via Tutor wrote: On 09/08/2019 09:54, mhysnm1...@gmail.com wrote: updates and insertions. I have multiple tables with the same structure with differe I agree 100% with Peter and Alan's responses. -- Bob Gailer ___ Tu

Re: [Tutor] instantiate and name a class from / with a string

2019-08-09 Thread bob gailer
On 8/9/2019 1:55 PM, ingo wrote: With the available classes Root, Channel and SSE I build the following (in CherryPy): root = Root() root.channel = Channel() root.channel.weather = SSE('weather') root.channel.energy = SSE('energy') root.channel.mail = SSE('mail') root.channel.rss = SSE('rss') .

[Tutor] instantiate and name a class from / with a string

2019-08-09 Thread ingo
With the available classes Root, Channel and SSE I build the following (in CherryPy): root = Root() root.channel = Channel() root.channel.weather = SSE('weather') root.channel.energy = SSE('energy') root.channel.mail = SSE('mail') root.channel.rss = SSE('rss') ... http://example.com/channel/weat

Re: [Tutor] Object creation query

2019-08-09 Thread Alan Gauld via Tutor
On 09/08/2019 09:54, mhysnm1...@gmail.com wrote: > updates and insertions. I have multiple tables with the same structure with > different names. Umm, why? Assuming by structure you mean they have the same fields then that's usually a bad design decision. Why not have one table with an attribute

Re: [Tutor] Object creation query

2019-08-09 Thread Peter Otten
mhysnm1...@gmail.com wrote: > All, > > > > I think I am asking for the impossible here. But I will ask anyway. > > > > I am using flask_sqlalchemy to build the tables and perform the queries, > updates and insertions. I have multiple tables with the same structure > with diff

[Tutor] Object creation query

2019-08-09 Thread mhysnm1964
All, I think I am asking for the impossible here. But I will ask anyway. I am using flask_sqlalchemy to build the tables and perform the queries, updates and insertions. I have multiple tables with the same structure with different names. A table called accounts which stores t