Re: Python OOP Problem

2009-12-29 Thread Миклухо
On Dec 29, 7:35 pm, Laszlo Nagy wrote: > > Thanks for reply, but it doesn't fit to my task. If I will add later > > other objects(and it will be very often) - I should stop the service, > > but that would be very bad. > > I think you meant "if you add other classes".> I'm not sure, if this is > s

Re: Python OOP Problem

2009-12-28 Thread Миклухо
On 28 дек, 18:29, "Martin v. Loewis" wrote: > Миклухо wrote: > > Hi, all. My problem is: > > 1) I have a database(postgresql) > > 2)I'm getting some string from database(string is a classname - > > written by me). > > 3)I need to construct new o

Re: Python OOP Problem

2009-12-28 Thread Миклухо
On 28 дек, 18:29, "Martin v. Loewis" wrote: > Миклухо wrote: > > Hi, all. My problem is: > > 1) I have a database(postgresql) > > 2)I'm getting some string from database(string is a classname - > > written by me). > > 3)I need to construct new o

Re: Python OOP Problem

2009-12-28 Thread Миклухо
On 28 дек, 18:29, "Martin v. Loewis" wrote: > Миклухо wrote: > > Hi, all. My problem is: > > 1) I have a database(postgresql) > > 2)I'm getting some string from database(string is a classname - > > written by me). > > 3)I need to construct new o

Re: Python OOP Problem

2009-12-28 Thread Миклухо
On 28 дек, 18:02, Daniel Fetchinson wrote: > > Hi, all. My problem is: > > 1) I have a database(postgresql) > > 2)I'm getting some string from database(string is a classname - > > written by me). > > 3)I need to construct new object from this string. > > In java it's done by Class.forName().newIns

Python OOP Problem

2009-12-28 Thread Миклухо
Hi, all. My problem is: 1) I have a database(postgresql) 2)I'm getting some string from database(string is a classname - written by me). 3)I need to construct new object from this string. In java it's done by Class.forName().newInstance(); For instance: 1)I receive the string: "MyObject". 2)o = My