Create objects from variable class names


Version: 1.2
Category:
Scripts
Python
Requirements:
Seller:
Price:
-
System:
Rating:
4.7
License:

Description - Create objects from variable class names



I sometimes want to Create objects from various classes based on some condition (without using EVAL()). For example when parsing X(HT)ML files I want to handle some tags using specific classes. It is actually quite easy but I had a hard time finding out how to do that, no doubt due to my limited knowledge of Python, so here`s a simple example. See also http://www.faqts.com/knowledge_base/view.phtml/aid/2635/fid/242



More in Python-Create objects from variable class names

Class Names Create Objects Create Objects From