<!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>
eyes = "brown"<br>
age = 99<br>
height = '5\'11'<br>
def thisMethod(self):<br>
return 'This method works.'<br>
<br>
This is me running it in Idle.<br>
<br>
>>> ExClass<br>
<b><class __main__.ExClass at 0xb5aec2fc></b><br>
>>> x = ExClass()<br>
>>> x.eyes<br>
<b>'brown'</b><br>
>>> x.age<br>
<b>99</b><br>
>>> x.height<br>
<b>"5'11"</b><br>
>>> 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>
eyes = "brown"<br>
age = 99<br>
height = '5\'11'<br>
def thisMethod(self):<br>
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>