Re: [Tutor] Running Python in script vs. Idle

2011-07-24 Thread brandon w
On 07/24/2011 07:59 PM, Steven D'Aprano wrote: brandon w wrote: Thank you. I understand that this ( x = 1+2 ) assigns a variable to "x" and will not print in Idle, but how would I get the 'class' that I created to run from the script like it does in Idle? Will I have to put print before every

Re: [Tutor] Running Python in script vs. Idle

2011-07-24 Thread Steven D'Aprano
brandon w wrote: Thank you. I understand that this ( x = 1+2 ) assigns a variable to "x" and will not print in Idle, but how would I get the 'class' that I created to run from the script like it does in Idle? Will I have to put print before everything I have to print? Yes. If you want someth

Re: [Tutor] Running Python in script vs. Idle

2011-07-24 Thread Steve Willoughby
On 24-Jul-11 16:21, brandon w wrote: 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: When you type a Python expression at the interactive prompt in IDLE or the python command-line interpreter, it w

Re: [Tutor] Running Python in script vs. Idle

2011-07-24 Thread Steven D'Aprano
brandon w wrote: I wrote this in Idle and ran it in Idle and it worked fine. [...] 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: [...] What is the difference? This is what was confusing me befo