15,181 Topics
| |
I am making a poker game using pyGTK. My problem right now is that the other players won't let me play! Each player has a function for betting and they go in order such as amandaBet(), playerBet(), billBet()... where player is you. Since this is a GUI game, I am … | |
Hi all, I plan to make a PRACTICAL dictionary and need help on just ideas. basically you can use dict datatype for simple dictionary and use dicy->key to retrieve but does that work for larger data queried from database? Or should I implement a database of key --->value? Any Idea … | |
Hi, I'm brand new to Python and am completely clueless in this assignment. This is the 3rd assignment, but the first without hints on how to import, etc.. The objective of this assignment was to decode a file we are supposed to use the python hw.py < code.txt command with. … | |
I want to make my characters move in realtime with NO pre-existing animation. The characters will move according to what is in front of them or if a enemy enters, etc. Are there any examples of this? Battlingmaxo | |
Hi i have this section of code that looks for user info on another table... this code works fine querying the database locally... but i need it to work remotely can anyone see what im doing wrong... [CODE]from sqlite3 import dbapi2 as sqlite import MySQLdb as mysql from mud.common.persistent import … | |
Ok trying to work with zipFile library how do you flatten the file hierarchy what works [CODE] zipFile = zipfile.ZipFile(imgSetup[0]+'/'+zipName, 'w') for picId, pathname in enumerate(pic_list): if start <= picId and picId <= end: zip.write(filedir+'/'+pathname) zip.close() [/CODE] what i am trying [CODE] zipFile = zipfile.ZipFile(imgSetup[0]+'/'+zipName, 'w') for picId, pathname in … | |
| So I have a couple strings [code]first = input("Enter a starting integer: ") last = input("Enter an ending integer: ") last = last + 1 [/code] How do I make another assignment to a string "n" that I want to take the value of each individual integer in the range? … |
I am working with classes for the first time in Tkinter. I have no experience working with classes before this, although I have had experience with basic coding syntax before. I am trying to make a function plotter. If I have a class PlotApp. This is my the class that … | |
I am trying to build a histogram. So far I have coded the following: from Tkinter import * def plot(data): numberOfBins = len(data) root = Tk() width, height = 200, 630 #taille de la fenetre die = Canvas(root, width = width, height = height) die.pack() numberOfStripes = 2 * numberOfBins … | |
Maybe someone can help me with this. I've been working with python for less than a week, and it's my first programming language. I'm looking to figure out some basic things in python for an algorithm I wrote in a pseudo-code. I'd like to know how I can take an … | |
Hi, I have a internet connection at home. I have installed Python2.6.1 on my laptop in C:\Python26 directory. I have written a script named "TestUtil_SendMail.py" and my intension is to send a mail to the given mail id. But when am running the script I am getting an error: "[Errno … | |
Hello, I'm very new to python but made this as a sort of exercise. It is a loan calculator that takes into account user input. [code=Python] r = input('What is your interest rate? ') t = input('How many payments will you make? ') la = input('What was the amount of … | |
Hi everybody i want write a checksum function using python but i cant .. #example #find the checksum of string_data string_data="0123456789abcdef" cksum=checksum(string_data) the checksum will be sum of 01+23+45+...+ef (adding each byte) then next result = ~result and finally result = result+1 def checksum(data): .......... return result my main problem … | |
| I've done a bit of searching but didn't come up with anything. Is there a way to use multiple placeholders and then use a list with as it assignment. i.e. [CODE] l = [1,2,3] l2 =['blah',50] print('%i isnt %i isnt %i which isnt %i' %(l[:],l2[1]))[/CODE] So if the first list … |
| Hey guys, I was just making a tiny program, where I need the user to enter numbers. My question is, how do get numbers? I tried: [code='python'] self.panel=wx.Panel(None,-1) self.n=wx.TextCtrl(self.panel,-1,"Number") self.get=int(self.n.GetValue()) [/code] -but that didn't work... so how do I do it? |
Sorry if this isn't the right place for this type of question (I'm pretty new to Python). If there is a better venue for this kind of thing, please let me know: I tried to run a few PyQwt demo, but it complained that there was no module named PyQt4. … | |
Hello all, I have been doing some work on my HTML editor lately, and I have come to a (what seams like a) dead end. The file its self is about 3.7kb smaller than my text editor, ProssesIT, and yet it fails to run any where near as smoothly. When … | |
Im really new to Python and I just learnt about Quadratic equations in maths, and so i made it made it my project to make a quadratic solver. But i have a problem i have a line [iCODE]if tocontinue == n:[/iCODE] I try to run it in IDLE and i … | |
Here's my code: [CODE]metres = float(raw_input("Enter the height (in metres): ")) total_inches = 39.37 * metres feet = int(total_inches/12) inches = int(round(total_inches - feet*12)) if inches < 0.5: print "Sorry, you have entered a height that is less than 1/2 inches," \ " please re-enter a new height." elif feet … | |
I've got the codes all done; so its looks like this: [code]public class RightTriangle { public static void main(String[] args) { Triangle shape = new Triangle(); shape.setBase(4.0); shape.setHeight(5.0); System.out.println("The base of the right triangle is " + shape.getBase()); System.out.println("The height of the right triangle is " + shape.getHeight()); System.out.println("The area … | |
I had asked this question and thought that I had it solved but I could not get the text defined as variables. Below is the text file. I would like to specify a line and the length and set that to a variable. In the Example below the items in … | |
| Hi all, for some time now I have been trying to practice developing python games and I've had a really annoying problem. I want to use image files but most of the time the picture itself is not a regular rectangle but an oval etc. and the thing that I … |
hi I'm trying to write a game where I play against the computer...and as u see below..I really suck at it.. can someone pleeease help me..I want it to be as simple as possible.. thanks input random game = raw_input("Your turn. Input the coordinate for your move on the form … | |
Can someone help me with this, if I run ftp, the page is downloaded and showed well, but the progress bar only shows 100% and doesn't progress at all.. [code] def progress_timeout(pbobj): # Calculate the value of the progress bar using the # value range set in the adjustment object … | |
hi, i want to develop the web frame work using django in python on Mac OS.so how to install django on mac . how to use it and test it.. can u tell me the process from installation to run the application.. | |
Hi all. i want to make separate process with python. for example i have python code. for example: [code] import time time.sleep(5) print "Time Over" [/code] named: t.py and i want to do all ^^that^^ just on other process :) i hope you understand. AND DONT GIVE ME LINKS PLS. … | |
hiya, pls I need help using this matrix function linalg.solve_banded with python(xy) or python 2.5.4 Used it in school with python version 2.5.2 but it just does not work with version 2.5.4 and I cannot figure out the real problem. Help please, | |
ok so im making a program that finds postage rate according to its weight and category. The category is standard for weights under 50g and other for over 50g. If the user enters a weight out of its category it will say error and close. and it only works for … | |
I am having a hard time identifying numbers in a text. Is there a way to recognize numbers? | |
Hi everyone! I'm a student taking an introduction to Python programming class and I'm in URGENT need of some help! Basically the program I need is to compute the "numeric value" of a name. Ex. a = 1, b = 2, c = 3, etc. So name abc = 6. … |
The End.