On Mon, 11 Apr 2005 23:59:35 -0300, Gabriel Genellina
[EMAIL PROTECTED] wrote:
At Thursday 7/4/2005 10:53, * William wrote:
For example, I'd like a way to get the symbol name for variable a
above. Is there a function like nameOF( a )?
Maybe a Python hacker guru could say something, but
At Thursday 7/4/2005 10:53, * William wrote:
Please stay in the list - and even move to the Python-list as those
topics are not specific to Windows.
Exactly what I want to do -- for
the enquiry about what I want to do, it is best to use as an
example.
#4
b = 2
print Before:
print a = %s %
Hello all.
Thanks for the tips and solutions posted to the list so far. This is
a general python question, not windows specific. It is my turn to ask.
(Perhaps the notion below will suggest some development to one of you. Who
knows?)
I want to execute a statement indirectly in Python.
* William wrote:
Hello all.
Thanks for the tips and solutions posted to the list so far. This is a
general python question, not windows specific. It is my turn to ask.
(Perhaps the notion below will suggest some development to one of you.
Who knows?)
I want to execute a statement
At Wednesday 6/4/2005 14:57, * William wrote:
HOW -- or, is it possible -- to execute the an assignment statement from a
string?
Try 'exec'
a=1
b=2
exec 'a=b+3'
a
5
Gabriel Genellina
Softlab SRL
___
Python-win32 mailing list
At 10:57 AM 4/6/2005, * William wrote:
[snip]
I want to execute a statement indirectly in Python. Take the simple case
below. The chevrons indicate the result of
the statement
b = 2
a = b + 6
eval('a = b + 6', globals(), locals() )
There are often better solutions than exec. Tell us a bit