Hi all:
Is there a metalanguage capability in Python (I know there are many) to
call a function having its name in a string?
Something like:
__call__("foo")
instead of:
foo()
Regards,
Tito
--
http://mail.python.org/mailman/listinfo/python-list
o it with a property:
def printPropertyForEach(collection, propertyName):
for elem in collection:
print eval("elem." + propertyName)
Is there another approach to do it?
Regards,
Tito
--
http://mail.python.org/mailman/listinfo/python-list
> Thank you both for your quick answers.
Thank you *all* for your quick answers.
--
http://mail.python.org/mailman/listinfo/python-list
Once again: thank you.
--
http://mail.python.org/mailman/listinfo/python-list
, I declare it just in place and go on. If I find
repetitive tasks I can declare functions, but I won't go for a class
immediately. Why do you think putting code into functions is not
encapsulating?
> While you could do all manner
> of nasty hacks in C++ I worked with people who carefull
Neil Benn wrote:
> Tito wrote:
>> N.Davis wrote:
>>> Functions existing in a module? Surely if "everything is an object"
>>> (OK thats Java-talk but supposedly Python will eventually follow this
>>> too) then there should be nothing in a module that
> [1] 'aName' => public, '_aName' => protected, '__aName' => private
I didn't know this one, as I am quite new to Python. Is it really
general use?
Regards,
Tito
--
http://mail.python.org/mailman/listinfo/python-list
t;
>>int too? ;)
>
>
> Yes, int too.
I think he is talking about *Java* int.
Regards,
Tito
--
http://mail.python.org/mailman/listinfo/python-list
For an internet telephone application, I need to be able to read and
write data to and from /dev/dsp simultaneously. I wrote some code and
its not working. Anyone have any working code to do this? I am
assuming my card is full duplex, it is a built-in sound card on a new
dell 600m laptop, but I
I got it working! There was another thread http://tinyurl.com/pebqc on
this group where someone had the same problem. I changed my code to
the following:
from twisted.internet.task import LoopingCall
from twisted.internet import reactor
import os, sys, wave, audioop
"""
While playing the conten
enormous:
for example for 430 degrees of freedom it is about 24 min in Python versus
about 1 sec in fortran.
Is it possible to get better performance in Python?
Thanks in advance
Tito Sano
Roma Italy
Cell: 339 6903895
--
https://mail.python.org/mailman/listinfo/python-list
11 matches
Mail list logo