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 solution, but test passed:
myimportmod =
On Dec 29, 7:35 pm, Laszlo Nagy gand...@shopzeus.com 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
On 12/29/2009 3:01 PM, Миклухо wrote:
On 28 дек, 18:29, Martin v. Loewismar...@v.loewis.de wrote:
In this case (you just started to learn Python), I recommend to take
an explicit approach. Create a dictionary that maps class names to
classes:
name2class = { MyObject : MyObject,
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 =
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.
Миклухо 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().newInstance();
For instance:
1)I receive the
On Dec 28, 7:29 am, Martin v. Loewis mar...@v.loewis.de wrote:
In this case (you just started to learn Python), I recommend to take
an explicit approach. Create a dictionary that maps class names to
classes:
name2class = { MyObject : MyObject,
MyOtherObject : MyOtherObject,
name2class = { MyObject : MyObject,
MyOtherObject : MyOtherObject,
Etc : Etc }
Then, when you receive the string class_name, you do
o = name2class[class_name]
o.myfunction()
The class needs to be instantiated, so the one line should be as
follows:
o =
On 28 дек, 18:02, Daniel Fetchinson fetchin...@googlemail.com 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
On 28 дек, 18:29, Martin v. Loewis mar...@v.loewis.de 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 object from this string.
In java it's done by
On 28 дек, 18:29, Martin v. Loewis mar...@v.loewis.de 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 object from this string.
In java it's done by
On 28 дек, 18:29, Martin v. Loewis mar...@v.loewis.de 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 object from this string.
In java it's done by
12 matches
Mail list logo