King a écrit :
Python's getattr, setattr and __getattribute__ commands
s/commands/functions/
works fine
with python types.
For example:
print o.__getattribute__("name")
A very few corner cases set aside - the main one being inside a custom
__getattribute__ method -, you should not directly
On Nov 16, 11:37 pm, King wrote:
> "eval" can solve this problem right away but I am concerned about
> security issues. If not "eval" could you suggest something more
> efficient way. It won't be a big deal to change the format as
> application is still at development stage?
You are stuck parsin
King schrieb:
"eval" can solve this problem right away but I am concerned about
security issues. If not "eval" could you suggest something more
efficient way. It won't be a big deal to change the format as
application is still at development stage?
If you don't want to use eval (which is a good
"eval" can solve this problem right away but I am concerned about
security issues. If not "eval" could you suggest something more
efficient way. It won't be a big deal to change the format as
application is still at development stage?
Thanks
Prashant
Python 2.6.2
Win XP 32
--
http://mail.python.
On Mon, Nov 16, 2009 at 10:53 PM, King wrote:
> Writing/Reading data to xml is not a problem. The problem is when I
> have to write to attributes in xml, where a connections has been
> established.
> XML:
> destattribute="node2.gradient.colors[1][2]"/>
You did not include an example like this in
Writing/Reading data to xml is not a problem. The problem is when I
have to write to attributes in xml, where a connections has been
established.
XML:
While reading back I have to convert both source and destination
strings into object so that I can call connections function using
source and targ
On Mon, Nov 16, 2009 at 10:04 PM, King wrote:
> Python's getattr, setattr and __getattribute__ commands works fine
> with python types.
> For example:
> print o.__getattribute__("name")
> print getattr(o, "name")
> This is the easiest way to get an attribute using a string.
>
> In my case the "Nod
Python's getattr, setattr and __getattribute__ commands works fine
with python types.
For example:
print o.__getattribute__("name")
print getattr(o, "name")
This is the easiest way to get an attribute using a string.
In my case the "Node" class load/creates all the attributes from a xml
file.
Exam