How to print the variable?
Jean-Paul Calderone
exarkun at divmod.com
Wed Feb 14 09:00:46 EST 2007
On Wed, 14 Feb 2007 05:47:31 -0800 (PST), Hans Schwaebli <hans_schwaebli at yahoo.com> wrote:
>Hi,
>
> am am a Python beginner with Java knowledge background. Infact I need to use Jython.
>
> My first beginner question is how to determine of what type a variable is?
>
> In program which supports Jython there is a variable called "rc" available. I can use the methods on that variable like rc.logMessage("hello"). But if I try to execute "print "${rc}" it tells me "Invalid variable syntax for attribute 'code' with value 'print "${rc}".'
print rc
print dir(rc)
print type(rc)
help(rc)
http://python.org/doc/tut/
Jean-Paul
More information about the Python-list
mailing list