15,190 Topics
![]() | |
Hi, I am wondering if there is any easy way to up the frame rate of a pygame program. For example locking the frame rate? I don't know. Thanks in advance! 26BM | |
Hi, the following is the code for my a2 computing project. Essentially what I have tried to do is set up two basic structures of GUIS and then inherit them into other classes so I can add components to the basic structure. However, when I create a MainMenu object, only … | |
Hi, I built a Polygon() class that originally only was initialized with veriticies: Polygon(verts=(1,2,3,4) But as the code evolved, I added a few @classmethods to construct the Polygon from other inputs. For example: Polygon.from_center(center=(1,2), length=5) Now my problem is that I'm trying to find the canonical way to choose which … | |
Assume that there are n tyres that could be used by car, tricycle and bicycle. Write a program to accept n tyres and generate all the combinations (i.e. the number) of car(s), tricycle(s) and bicycle(s) that could exhaust the n tyres. Ensure that all the objects have fair share where … | |
In the following program how does the line `r.size = 150, 100` actually set the values using this line -> `size = property(getSize, setSize)`? property has two arguments, getSize & setSize, it seems to me that would only allow it so get one value and set one value. #!/usr/bin/python3 class … | |
I know python is an interpreted language but is there a way to compile your code? What if you write a program in python 3 and the user has python 2.x, or worse yet, doesn't have python at all. How can you create an executable via compiling or any other … | |
Hi i was wondering if anyone could help me, im wanting to when you click in a certain area it changes the background image thanks import Tkinter as tk from Tkinter import* import urllib import base64 def click(event): if event.x > 100 and event.x < 430: if event.y > 100 … | |
I'm trying to write a recursive functionthat receives a parameter n and returns the multiple of 5. Example: if we have 5 as the argument, the print out will be : 5 10 15 20 25 My code: def MultiplyRecursive(r): if r == 1: return 5 else: return MultiplyRecursive(r-1) + … | |
class MemberCounter: members = 0 def init(self): MemberCounter.members += 1 # m1 = MemberCounter() # m1.init() # MemberCounter.members -> 1 # m2 = MemberCounter() # m2.init() # MemberCounter.members -> 2 # m1.members -> 2 #m2.members -> 2 # m1.members = 'Two' # m1.members -> 'Two' # m2.members -> 2 In … | |
#Name: Calum Macleod #Date : November 6, 2012 #Purpose: A Python program with a loop that lets the user enter a series of whole numbers. #The user should enter the number -99 to signal the end of series. #After all the numbers have been entered, #the program should display the … | |
I need to read excel files and compare them and produce new outcomes using Python. i have realized that by suing the following codes I can read an excel file: import xlrd wb = xlrd.open_workbook('values.xls') wb.sheet_names() But i keep getting error of: [COLOR="Red"]Traceback (most recent call last): File "C:/Python26/Atest/filename.py", line … | |
I'm writing a script that downloads files for web design, and this line produces Traceback (most recent call last): File "bootlace.py", line 60, in <module> download(data['jquery'], 'Downloading jquery. (File size %s)', 'js/') File "bootlace.py", line 11, in download file_size = int(meta.getheaders("Content-Length")[0]) IndexError: list index out of range That line is … | |
I'm learning django and for the latest version of the tutorial i'm using, you must have python 3 installed. Despite the fact I have python 3 installed, python 2.7.6 is being loaded. My path originally had no reference to python, so I added it. C:\Ruby200-x64\bin;C:\Users\Freddy\AppData\Roaming\npm;C:\python33\python.exe However, python 2.7.6 is still … | |
![]() | Can the sibprocess.call('') function be used to execute .mp3 files, it doesn't work for me. Which function is used to run any video or audio file from within Python? |
so i "finished" my irc bot in python. by finished i mean it only connects to irc.quakenet.org #cplusplus (you can see it if you connect. its called DTSCode-Bot). however, the point of my class isnt just to create a bot. i also want to create a client. so i cant … | |
I am trying to create a Caesar Cipher in Python. I have managed to put together my program with the help of some other websites but have hit a bit of a wall. My code allows me to encrypt a single character and will then ouput this and write it … | |
Hey there everyone. well i have been working on python for about 2 months now and i just cant seem to get my background image to work. I have created the GUI with Tkinter and put a label in it with my name etc, but the idea was to have … | |
Hi there, I am a novice in python. I want to use python in web development but I don't know where I start. Please help me. | |
Hi everyone, I recently installed Python on Windows. I wanted to develop a gui program using Tkinter. The problem is that when I try to import Tkinter module. It gives me a 'module not found' error. But I thought Tkinter was preintalled within Python's installation. It is even more confusing … | |
In the following program why is pwd.getpwuid returning my user and group names followed by three commas? Where ar ethe commas coming from? #!/usr/bin/python3 import os, stat, pwd dirList = os.listdir() permissions = (stat.filemode(os.stat(dirList[1]).st_uid)) string = permissions + ' ' string = string + dirList[1] print(string) temp = os.stat(dirList[1]) print(temp.st_uid) … ![]() | |
hi, can any one help me to use the jira in python how create the code ?? how ro run it ??? ![]() | |
hi, **please help me to solve the error for:** **text1.txt:** line1 <data> line2 <items> line3 <match name="item1" rhs="domain.com"></match> line4 <match name="item2" rhs="domainn.com"></match> line5 <match name="item2" rhs="1010data.com"></match> line6 </items> line7 </data> **text2.txt:** line1 djshjsdf line2 sdfngjfg check domain.com,domain.com,1010data.com in text2.com, if not there print domain.com,domain.com,1010data.com in to the 3rd text file(text3.txt) … | |
I'm trying to create a window with QWebView as its central widget and set inside it only the youtube clip box without the rest of the information on that youtube webpage. The YouTube links can change by request of the user. I found this [example](http://stackoverflow.com/questions/15983148/the-sound-dont-stop-when-qwebview-window-closed-loaded-with-youtube-video) where it works that way. … | |
so.. to put this simply: >>> BU5 = bu(5) >>> BU5() 0 >>> BU5(1024) 1024 >>> BU5 == bu(5) False >>> BU5 <__main__.bu instance at 0x00AC5E40> >>> bu(5) <__main__.bu instance at 0x012C6788> BU5 == bu(5) is supposed to return True due to it's expected usage: >>> var = bu(5)() #read … | |
Shows you how to play sound files with the pySFML module and Python. | |
QUESTION DEFINITIONS var P1_1 = new Array("P1_1", "An audit charter should:", "A. be dynamic and change often to coincide with the changing nature of technology and the audit profession.", "B. clearly state audit objectives for the delegation of authority for the maintenance and review of internal controls.", "C. document the … | |
text1.txt: line1 hdfbghasbfas line2 jdsbvbsf line3 <match name="item1" rhs="domain.com"></match> line4 <match name="item2" rhs="domainn.com"></match> line5 <match name="item2" rhs="1010data.com"></match> need to retrive domain.com,domainn.com,1010data.com to "result.txt" `` import re f1 = open("C:/Users/Netskope/Desktop/m/test1.txt", "r") f2 = open("C:/Users/Netskope/Desktop/m/result.txt", "w") d1 = f1.readlines() for line in d1: match = re.findall('<match name="item1" rhs="(\w.+")', line) if match in … | |
Hi there, I'm not a developer. I'm a graphics designer. I would like to learn about web development. For that I'm doing research in different languages. Most of them suggested PHP and Python. I know little about PHP. But Python I don't rightly know. Tell which one I can go … | |
if __name__ == "__main__": args = parse_args() install_path = os.getcwd() if os.getuid() != 0 and args.create_user and not args.no_install_prequisites: While compiling the above source code in windows i get this error > module' object has no attribute 'geteuid' windows can any one resolve this. | |
Hi Is there any possibility to update tuples dynamically(in a :for loop" say) Else is there possiblity to dynamically create a new tuple? Thank you in advance |
The End.