<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#ffffff">
Python version 2.6.6<br>
<br>
I wrote this in Idle and ran it in Idle and it worked fine.<br>
<br>
class ExClass:<br>
&nbsp;&nbsp;&nbsp; eyes = "brown"<br>
&nbsp;&nbsp;&nbsp; age = 99<br>
&nbsp;&nbsp;&nbsp; height = '5\'11'<br>
&nbsp;&nbsp;&nbsp; def thisMethod(self):<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return 'This method works.'<br>
<br>
This is me running it in Idle.<br>
<br>
&gt;&gt;&gt; ExClass<br>
<b>&lt;class __main__.ExClass at 0xb5aec2fc&gt;</b><br>
&gt;&gt;&gt; x = ExClass()<br>
&gt;&gt;&gt; x.eyes<br>
<b>'brown'</b><br>
&gt;&gt;&gt; x.age<br>
<b>99</b><br>
&gt;&gt;&gt; x.height<br>
<b>"5'11"</b><br>
&gt;&gt;&gt; x.thisMethod()<br>
<b>'This method works.'</b><br>
<br>
Then I try to run it from a script in Gnome-terminal and it does not
run. I do not get output. I have to add print. to get any output like
this:<br>
<br>
#!/usr/bin/python<br>
<br>
class ExClass:<br>
&nbsp;&nbsp;&nbsp; eyes = "brown"<br>
&nbsp;&nbsp;&nbsp; age = 99<br>
&nbsp;&nbsp;&nbsp; height = '5\'11'<br>
&nbsp;&nbsp;&nbsp; def thisMethod(self):<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return 'This method works.'<br>
<br>
x = ExClass()<br>
x.eyes<br>
x.age<br>
x.height<br>
x.thisMethod()<br>
<b>print</b> x.thisMethod()<br>
<br>
What is the difference? This is what was confusing me before.<br>
<br>
Brandon<br>
<br>
<br>
</body>
</html>