15,181 Topics

Member Avatar for
Member Avatar for txwooley

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 …

Member Avatar for txwooley
0
271
Member Avatar for Stefano Mtangoo

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 …

Member Avatar for Gribouillis
0
176
Member Avatar for persianprez

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. …

Member Avatar for ov3rcl0ck
-1
290
Member Avatar for BattlingMaxo

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

Member Avatar for BattlingMaxo
0
101
Member Avatar for darkbow

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 …

Member Avatar for jice
0
123
Member Avatar for kingofkya

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 …

Member Avatar for kingofkya
0
200
Member Avatar for DEATHMASTER

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? …

Member Avatar for snippsat
0
120
Member Avatar for marshall31415

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 …

Member Avatar for woooee
0
185
Member Avatar for pelupelu

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 …

Member Avatar for woooee
0
2K
Member Avatar for jmark13

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 …

Member Avatar for jmark13
0
174
Member Avatar for shakilaf

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 …

Member Avatar for Dan08
0
2K
Member Avatar for Mensa180

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 …

Member Avatar for Mensa180
1
325
Member Avatar for iamai

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 …

Member Avatar for iamai
0
227
Member Avatar for khaos64

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 …

Member Avatar for khaos64
0
116
Member Avatar for sravan953

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?

Member Avatar for snippsat
0
677
Member Avatar for pmennen

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. …

Member Avatar for vegaseat
0
2K
Member Avatar for The-IT

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 …

Member Avatar for jlm699
0
3K
Member Avatar for Dragazarth

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 …

Member Avatar for Dragazarth
0
88
Member Avatar for saikeraku

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 …

Member Avatar for snippsat
0
78
Member Avatar for StarZ

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 …

Member Avatar for StarZ
0
244
Member Avatar for Joe Hart

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 …

Member Avatar for Joe Hart
0
121
Member Avatar for masterofpuppets

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 …

Member Avatar for ov3rcl0ck
0
134
Member Avatar for c_crash

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 …

Member Avatar for jlm699
0
125
Member Avatar for Kruptein

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 …

Member Avatar for Kruptein
-1
154
Member Avatar for mohankumar554

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..

Member Avatar for jlm699
-1
134
Member Avatar for Dixtosa

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. …

Member Avatar for ov3rcl0ck
-2
261
Member Avatar for mbaliko

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,

Member Avatar for vegaseat
0
17
Member Avatar for goboman

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 …

Member Avatar for jice
0
86
Member Avatar for pelupelu

I am having a hard time identifying numbers in a text. Is there a way to recognize numbers?

Member Avatar for jice
0
84
Member Avatar for adunham1

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. …

Member Avatar for pysup
-1
113

The End.