December 5th, 2002, 09:10 AM
I couldn't get any of the programs to run from a "script" file...only interactive. I wonder if there is a tutorial that can help you to actually run these programs? Thanks.
Which parts did you try to run in a script? Many of his snippets were just declarations of objects, so by themselves they would have no output (even though they "ran" correctly). Really, it looks like it was all intended to be run interactively, anyway.
Also, notice that when you simply name a variable in the interpreter, its value is returned. This doesn't happen in a script. You would need a print statement (or some such) to output the value from a script.
> the meaning of life in python: int('10'*3,2)
Object Oriented Programming With Python (part 1)
Object Oriented Programming With Python \(part 1\)
As a true object-oriented language, Python is a great place to start learning about OO programming. In this first segment of a two-part article, take your Python skills to the next level with a discussion of classes and class instances. Practical (and not-so-practical) examples included.
Please discuss this article in this thread. You can read the article here .