520 Posted Topics
How do I get my python code to compile one line at a time so I can see exactly how the code works. If anyone knows how to do this with Wing IDE that would also be helpful. Thanks. | |
I'M reading the book "Python Programing second edition for the absolute beginner". While explaining the object paramater whithin a class, this how it reads. Base your class on [I]object[/I] , a fundamental, built-in type. Can someone please tell me what that means? Thanks. | |
Does anyone know where I can find a goo pdf python reference for the following? pre built constructors, functions/methods for the follwoing tuples, lists, dicts...etc I hate reading a book with nothing but quick explanation, I want to see them for myself. And I already know how to find them … | |
These three things are holding me back. 1. The new style class object parameter - [CODE]class MyClass(object)[/CODE] [INDENT]Note that I'M also also not familir with the old style[/INDENT] 2. The [CODE]_init_([/CODE] - constructor, or any constructs for that matter. 3. The [CODE](self)[/CODE] parameter. How is it different from the normal … | |
Has anyone red "Microsoft XNA Game Studio 2.0"? I'M having a really hard time with it. From the get go, the book doesn't explain what to do with the code. It instructs me to alter a Draw() function, near the bottom of the code and then later wants me to … | |
I am currently reading two books, one on PHP and one on Python. Not that I'M good at ether. I'M about half way through the book on PHP or less and almost done with the one on Python. Though I haven't actually read anything web related in this particular Python … | |
First of all, I'M reading the book "Microsoft XNA Game Studio 2.0". I understand the error I'M getting but I don't know what to do about it. The error says I can't use backgroundColor before it has been declared. I'M following along with the book so I don't see why … | |
I recently posted a very small program the uses pygame and the livewires package but was unable to get the program to run. I think the Title for that posting was Graphics Window or something close to that anyway. Since I can't resolve that problem, does anyone have any suggestions … | |
I have installed pygame and livewires but am getting the following error with the following short program that I got from my python book. [COLOR="Red"]AttributeError: 'module' object has no attribute 'init'[/COLOR] [CODE]# New Graphics Window # Demonstrates creating a graphics window from livewires import games games.init(screen_width = 640, screen_height = … | |
How do you know when to use a function by wraping the content between parentheses "function(x) or through dot notation x.function() ? thanks. ![]() | |
I got the book Torque for teens but I can't follow along with the book because it instructs me to copy the folder \example into itself and rename it to \experiment. The books says it's located in whatever directory I installed torque into and then \Torque\SDK\example But I can't find … | |
I the following program, can someone please explain these two lines. "def __init__(self, master):, & Frame.__init__(self, master)" One other thing. Shouldn't the method "update_count" use a return to return the new count? thanks. [CODE]# Click Counter # Demonstrates binding an event with an event handler from Tkinter import * class … | |
I more than half way through the book "Python programming for the absolute beginner" 2nd Ed. and things are really starting to get hairy. The book has me to write some code just before or after explaining each part. But I have to really concentrate on the paragraph I'M reading … | |
I more than half way through the book "Python programming for the absolute beginner" 2nd Ed. and things are really starting to get hairy. The book has me to write some code just before or after explaining each part. But I have to really concentrate on the paragraph I'M reading … | |
In the program below, how does the value "Poochie" know where to go in the line [CODE]crit = Critter("Poochie")[/CODE] And how do the get_name and set_name functions know when to do their thing, they don't seem to get called or anything? Thanks. [CODE]# Property Critter # Demonstrates get and set … | |
I'M reading a book on Python and my very first object/constructor program isn't show the output that the book is showing. I lacks the two lines "A new critter has been born!" [CODE]# Constructor Critter # Demonstrates constructors class Critter(object): """A virtual pet""" def _init_(self): print "A new critter has … | |
In the following code, in the method [CODE]talk(self)[/CODE], [CODE]self.name[/CODE]. What self is self.name referring to? I though variables created in functions and methods are only good within that method or function. But here it looks like it's talking to [CODE]__init__[/CODE] & [CODE]__str__[/CODE]. Can someone please explain? It's starting to get … | |
In the code below, the only part I'M having trouble with is word[position]. I know this is something really simple but I've always had trouble understanding these kinds of statements. I know that it print a random letter (position) from (word). What I don't know is why or how it … | |
In the code below, the only part I'M having trouble with is word[position]. I know this is something really simple but I've always had trouble understanding these kinds of statements. I know that it prints a random letter (position) from (word). What I don't know is why or how it … | |
In the program be below, I'M having trouble with these few lines, remember, I'M new. What's going on here? I'M just a little confused because there is (word) wraped in len(). [CODE]position = random.randrange(len(word))[/CODE] And what's going on with these two lines? Thanks. [CODE] jumble += word[position] word = word[:position] … |
The End.