When using pygame I cannot get the balls to bounce off eachother
hello,I am writing a really simple python program using pygame. However i cannot figure out how to make the balls bounce off eachother.here is my codeimport pygameimport randomimport time# Define some...
View ArticleAccessing variables from a file
Hi,I have 2 files file1 & file2.I am trying to open file1 and print str1 and n in file2.Code:file1:str1 = "192.168.10.1"...n =var.split('.')[3]print nfile2:with open(r"txt.py","r") as f: for line...
View ArticleNot exiting a while correctly
I am reading the wikibook the non programmers guide to python.In chapter 5 I have created the guessing game. simple game 3 guesses or its over and it prints a message.Even if my game resolves that they...
View ArticleAccessing variables from a file
Hi,I have 2 files file1 & file2.I am trying to open file1 and print str1 and n in file2.Code:file1:str1 = "192.168.10.1"...n =var.split('.')[3]print nfile2:with open(r"txt.py","r") as f: for line...
View ArticleWhy Python
I've tried in the past to learn C++ and now C#. In both cases I get so far into it and then things just start getting to complicated. Would python be a better place to start? And if so, why? Also, most...
View Articlepassing variables between functions
how do i pass variables from one function to another in python?
View Articletuple of list/tuple pointing to list
[code] logg = 'c:\tmp\Logg\12-12-13.txt' f=open(logg,'r') file = f.readlines() f.close Data={} feltypen=() for line in open(logg): if len(line)>142: grab= (line) #d
View Articletuple of list/tuple pointing to list
[code] logg = 'c:\tmp\Logg\12-12-13.txt' f=open(logg,'r') file = f.readlines() f.close Data={} feltypen=() for line in open(logg): if len(line)>142: grab= (line) #d
View ArticleMusic Playing; But Screen Is Blank. Pygame Help!!!
I'm a new programmer working on a memory game for my computer science summative. I'm basically done but I really want to get the game to play music while the user is playing. I finally got the music to...
View ArticleMusic Playing; But Screen Is Blank. Pygame Help!!!
I'm a new programmer working on a memory game for my computer science summative. I'm basically done but I really want to get the game to play music while the user is playing. I finally got the music to...
View ArticleParallelize recursive code using multiprocessing in python
I have implemented following code using multiprocessing library but it is not working. can you please find the error.p=[]def func(a,i): if a>i : proc=Process(target=func,args=(a-1,i,))...
View ArticleI require a lot of help on reading and sorting files
And before I go posting away about my code, I was wondering if there is actually someone here who knows programming on python and is willing to help. Long story short, I am trying to write a code which...
View ArticleI require a lot of help on reading and sorting files
And before I go posting away about my code, I was wondering if there is actually someone here who knows programming on python and is willing to help. Long story short, I am trying to write a code which...
View ArticleParse Error when using showforms() command with Twill
Hi, bare with me with this as it's my first python program. I've spent a few hours Googling and testing for a solution but I'm at that point where I think I just need a helping hand from one of you...
View ArticleParse Error when using showforms() command with Twill
Hi, bare with me with this as it's my first python program. I've spent a few hours Googling and testing for a solution but I'm at that point where I think I just need a helping hand from one of you...
View ArticleNeed help with python assigments as sooon as possible
Create a program that assists in a basic form of cryptography, a substitution cypher. Write a program that will accept a phrase and convert it into code by substituting letters according to a key.This...
View Articlewriting in to excel sheet with label
Dear all,I am reading data from Serial port. data are in format below. Below code are seprating the data. I wanna know how can write it in excel sheet with time and date/mode/ dir/ actual postion as...
View Articlemachine code question 4 novice
Hi my name is steven tyson, and i'm using a free phython compiler 1.53to program machine code using boolean statements i.e.(or,xor,nor,and)i know it sounds tedious and maybe impractical, but with...
View Article