15,190 Topics
![]() | |
Hello, I have been working on a code to simulate wind turbines. However, I can't seem to rotate the wind turbine. Here is the code. import pygame ############################################# # Written by P****** ******* and V***** *** # # Copyright 2012 # ############################################# pygame.init() # Gets Information humidity = float(raw_input("Enter Humidity … | |
I am learning re module for practice I have taken an export of my phone addressbook which is a comma seperated text file, containing "First Name","Mobile Phone","Home Phone","Company","E-mail Address","Company Main Phone","Business Fax","Birthday" as of now I am more interested in First name , mobile phone number and email address. in … | |
Hi guys, So I have a list of objects, each which belong to a particular subclass. I am trying to calculate a running standard deviation as follows: Label = [] Resistance = [] m = 0 i = 0 j = 0 for row in Reader: if len(row) == 0 … | |
Hey I am having trouble with a tic tac toe game and I could really use some help. My if statement(line 51) is underlined, says its invalid syntax, and I cant fix it no matter what I do. Here's my code: http://pastebin.com/UtVTz4gg | |
While I know some Python language I just can seem to make thi work: So I have this script that when you post a command: -ytb [search terms], it would look up the video in an atom feed from yuotube, could you tell me what I have wroong here? Because … | |
This small python script invokes the [Treeline](http://treeline.bellz.org/index.html) tree visualizer to display xml files in a pleasant way.  | |
I am new to python web frameworks. I am using web.py because I like how raw it is. I am wondering though, how one can produce pages and scripts efficiently when being restricted to sending output through the return keyword? It seems like for any python module you can only … | |
Dear list, i am new to python as well as new to programming with no previous programming experience, i have to design GUI in python and implement multithreading in it, and also perform multithreading at servers in query handling. I checked so many web pages and tried to learn basics … | |
Hey, Guys and Gals. For some reason the variable text_list seems to be modified after the variable final has been modified. text_list is a list of text :) Full code is below. Any other hints and tips would be great Thanks a bunch. decode_list = [] key = 0 final … | |
I'm trying to make a calculator with Tkinter but I'm having trouble using a for loop to make the number buttons. I'm using a for loop as they are nearly identical. Here's the loop: class Calculation: def __init__(self,master): i=1 rowi=1 columni=0 self.num = "" self.button = [] frame=Frame(master) frame.grid() self.returnScreen … | |
I'm making a little program with tkinter and trying to get this timer to work. I'm getting a "'float' is not callable" error. Does anyone know what I'm doing wrong? The error happens when it tries to call 'self.clock_start()' def create_widgets(self): #create the main frame self.root = Tk() self.root.title("Learning Timer") … | |
![]() | When using this code to insert 5, then 18, into a binary search tree, the data value 18 is placed as the left child of the root instead of the right child. The statement if data < node.val: (in the insertR method) doesn't seem to be working correctly. Can someone … ![]() |
Hi all, I seem to be having problems with summing all the values in a .csv file with the following format: 3.2323232312 7.5345345675 3.3423565624 etc... I have opened this with a spreadsheet at it seems the floats are all in column[0] and each number is on a different row. with … | |
Hello everyone, I am trying rotate in pygame, but I can't. What would be the best way to rotate something around its own center?? Thanks | |
I am importing a library into a script that is being used in a php document, but for the script to run, I need to import a library that is rather large. Is it possible to permanently import the library so I do not need to load it up each … | |
So i have looked in this forum and grabbed a piece of code that let me encrypt text using a cypher. I have changed it so that you can input your own text to be encrypted and a little more. I am 15 and this is my 2nd day learning … | |
Hello. I have been having trouble with this pygame program. I am trying to imitate a wind turbine. However, when I run the command, it returns with a blank black screen with a square. What is wrong?? Here's the program: import pygame ############################################# # Written by P****** ******* and V***** … | |
Hi there, My problem involves reading in and working with an excel file that contains blank cells randomly throughout the spreadsheet. The reason there are blank cells is because I have expression data for various cell types but for some of the cell types the expression data was not available. … | |
So I have a YML file, and I'm trying to convert it to a different format. I found a YML format converter script and edited it to the best of my ability, and this is what I've come up with: #!/bin/python try: import yaml except: print "Failed to import module: … | |
[B]!USING PYTHON 3.1![/B] Hello DaniWeb! Today I'm going to be posting a [B]simple[/B] threading tutorial. First of all, what is threading? Well, threading is just another way of doing a side task without interrupting the main program. Now here's a simple example. Let's say we are going to make a … | |
There must be a better way of writing the following code, I would really appreciate your suggestions and coding. I am new with python. Thanks. A1 = os.path.join(pathname, "x") A2 = os.path.join(pathname, "x", "y") A3 = os.path.join(pathname, "x", "y", "z1") A4 = os.path.join(pathname, "x", "y", "z2") createPath(A1) createPath(A2) createPath(A3) createPath(A4) | |
What is the Python (2.7) equivalent of the PHP $_POST, $_GET, $_SESSION and $_COOKIE, and how are they used ? After almost 2 years of trying I have finally gotten Python to work on my WAMP server - only to find that it is severely lacking in web page functionality. | |
Hi, I would like to understand what does the following "<<" does in the following statement? (ord(msg[i+1]) << 8) As it is two less than sign, I couldn't find some meaningful response on google:( thanks. | |
I'm creating a little space shooter game. I need to limit the amount of times a player can fire, I'm setting a 2 second limit. But whenever I try to implement that it just won't work. The bullets keep firing multiple times a second. Here's my code, I'd be very … | |
| |
I came across this project that could be really helpful.. if I was c++ literate. I know enough c++ to be dangerous and thats about it. Thanks in advance for anyone who wants to take a crack at it. ps credit to: http://www.codeproject.com/Articles/13839/How-to-Prepare-a-USB-Drive-for-Safe-Removal | |
I'm trying to write program in Python using PyOpenGL which I need to use glutMouseFunc for some mouse functionality but when I run the program I get the following error: Traceback (most recent call last): File "teapot.py", line 80, in <module> glutMouseFunc(mouseHandle) File "/usr/lib/python2.7/dist-packages/OpenGL/GLUT/special.py", line 137, in __call__ contextdata.setValue( self.CONTEXT_DATA_KEY, … | |
First, what do I need to add to my Win 7 SP1 in order to execute Python scripts? Second, what's a good Win x64 IDE that's super simple, free of too many bells and whistles, and good at testing and debugging basic textmode Python scripts? I need to be able … | |
Hi all, I am trying to use the following python code to read data from two .csv files which have data in the following format, e.g. 1, 23.27, 23.21, 83.22 2, 34.25, 65.31, 34.75 ... etc I seem to be getting an error around during execution of the function. I … | |
The End.