Posts
 
Reputation
Joined
Last Seen
Ranked #3K
Strength to Increase Rep
+6
Strength to Decrease Rep
-1
100% Quality Score
Upvotes Received
12
Posts with Upvotes
12
Upvoting Members
7
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
3 Commented Posts
~99.1K People Reached
Interests
Love to bake, read, write, and play video games.
PC Specs
Ubuntu Linux
Favorite Tags
Member Avatar for ultimatebuster

Is it possible to store a certain function as a variable? If not, is it okay to make a class, and define a function. Store the class as the variable and invoke that function?

Member Avatar for tomas_petricek
1
31K
Member Avatar for adanaz

I am making a text adventure and would like the command line window to be a specific size when you run the .py file in the command line window. eg. 300 wide by 250 height. I found a thread on here that shows how to specify the text colour which …

Member Avatar for DubWine
0
18K
Member Avatar for D3BuG

Hey guys, So me and my friend are starting up a simple Text-Based-Post-Apocalyptic-Role-Playing-Game. Both of us have had 2 or so months of experience, we are no experts. So, I will appreciate any tips. I have been lurking these forums for a little while now, and decieded this is the …

Member Avatar for D3BuG
0
163
Member Avatar for gunneronaspooky

Hey guys...Need some help with a program for class...here's the assignment If your program detects an error condition, you can make it raise an exception. Here is an example that gets input from the user and checks for the value 17. Assuming that 17 is not valid input for some …

Member Avatar for gunneronaspooky
0
176
Member Avatar for linux

[B]Ah! Never mind! I forgot you could embed classes such as:[/B] [code]class Heroes(): class Lords(): class Phill(): hp = 25 >>> Heroes.Lords.Phill.hp 25[/code] ------------------------------------------------------ I am attempting to write an RPG in Python. I am not worrying about the battle system or mapping quite yet, and am more focused on …

Member Avatar for richieking
0
5K
Member Avatar for kur3k
Member Avatar for akkarin1313

[code]def main(): splash() wordTotal = 0 longestWord = 0 fin = open("constitu.txt") for line in fin: #n = fin.readline() wordLine = line.split() #word = wordLine.split() wordTotal += len(wordLine) #if len(word) >= 15: #longestWord += 1 #print word print "This constitution has ",wordTotal, " words." def splash(): print "This program is …

Member Avatar for woooee
0
2K
Member Avatar for novice20

I have python 2.5.2 on my Debian system n want to upgrade it to python 2.6. Got to know that apt-get install package searches for package in /etc/apt/sources.list I have downloaded python 2.6.2. How to add an entry to the file /etc/apt/sources.list ? :(

Member Avatar for npmaier
0
174
Member Avatar for knan

I have a set of text files in a folder. I want to read each file, convert the contents of the file to lowercase, remove punctuations and save them all in another directory with the same filenames. How can i do that???

Member Avatar for griswolf
0
315
Member Avatar for redyugi

This is used for finding the roots of a parabola. The parabola must have a number in front of x2 (x squared), a number in front of the single x, and a following number, or you can have a perfect square parabola. (in the form "number x2 - number") This …

Member Avatar for redyugi
0
422
Member Avatar for vmars

Please UNsubscribe me! Your site loops endlessly when I try to UNsubscribe. Please UNsubscribe me! Before I have to curse my way out of here. Please UNsubscribe me from all things Python! Thanks!

Member Avatar for Stefano Mtangoo
0
396
Member Avatar for Elihu5991

My friend downloaded Unity3d to get started in 3D game development for our site; but found out it costs. We are tight on budget and need a free solution for the time being. Thankyou so much for your help.

Member Avatar for Elihu5991
0
289
Member Avatar for sss33

out = open ("output.jh") towrite= a+b out.write (towrite) When you want to put an output to a file. instead of the information going right next to eachother how could they go one over the other in the file. This would be for many different outputs.

Member Avatar for cghtkh
0
97
Member Avatar for softbrianes

Hello, Im failing to crack the messege" XWUFTOSNWHCFGIBWYATYJIB" which is the solution to the question " What do you call an old hen that makes annoying noises?" Please help me solve it. Kindest regards Softbrianes

Member Avatar for redyugi
0
50
Member Avatar for bettersaid

Is it possible in python to open all files in a directory? this only opens a particular file: [CODE]import os path = "/Desktop/directory/file.odt" temp = os.system("open " + path)[/CODE] how about this? am i doing it right? [CODE]import os mypath = "/Desktop/directory" temp = os.listdir(mypath) temp = [os.path.join(mypath, i) for …

Member Avatar for redyugi
0
127
Member Avatar for jtaylor-bye

Hi all this is my code :- [CODE]import pygame from pygame.locals import * from sys import exit from random import * pygame.init() screen = pygame.display.set_mode((640, 480), 0, 32) while True: for event in pygame.event.get(): if event.type == QUIT: exit() screen.lock() for count in range(10): random_color = (randint(0,255), randint(0,255), randint(0,255)) random_pos …

Member Avatar for redyugi
0
3K
Member Avatar for Ghostenshell

I need to check for floating point numbers inside my class but it doesn't seem to be working. Any suggestions? [CODE] class Rectangle: def __init__(self, length = 1, width = 1): self.__length = length self.__width = width ##Setters to float def set_length(self, length): self.__length = float(length) try: #self.__length = float(length) …

Member Avatar for Ghostenshell
0
212
Member Avatar for gunneronaspooky

I've built my fair share of computers and figured it was time to learn to take advantage of that hardware by learning to program. So I'm taking some courses online. I'm having some issues writing some programs though, so any help would be appreciated. Right now, I'm stuck on this …

Member Avatar for gunneronaspooky
0
129
Member Avatar for lionaneesh

[B][I][U]Introduction[/U][/I][/B] Hey guys today I am writing a tutorial on Lists and tuples in Python.... So lets get started... [B][I][U] Layout:- [/U][/I][/B] 1.What are data sturctures? 2.What are tuples? 3.What are lists? 4.inbuilt functions on lists and tupples [B][I][I][U] What are Data structure?[/U][/I][/I][/B] Anybody familiar with programming or Actually Computers. …

Member Avatar for redyugi
1
3K
Member Avatar for redyugi

I have recently redid an earlier version of my version of Pong. However, I am having a slight issue with it. Whenever the ball hits the opposing paddle and then hits the bottom, the ball travels along the bottom until the player paddle hits it. I have tried for days …

0
91
Member Avatar for ultimatebuster

Why do people say isinstance is bad? If I have my own class, named Test, and if I want to check an variable to see if it is an instance of Test or Test's child classes, is using instance() bad?

Member Avatar for TrustyTony
0
180
Member Avatar for GuyClapperton

A small story in the context of the rest of the world is the UK Government's call for the banning of forthcoming computer game, [URL="http://www.medalofhonor.com"]Medal of Honor[/URL]. British Defence Secretary [URL="http://http://www.liamfox.co.uk/text.aspx?id=1"]Liam Fox[/URL] has called for the ban because unlike its predecessors the game is set in Afghanistan, where of course …

Member Avatar for dirkmack
0
248
Member Avatar for locomotive

how do i print the 3 most common word that begins with capitals? also how do i count how many times they appear?

Member Avatar for snippsat
0
136
Member Avatar for lewashby

According to the book I'M reading clock = pygame.time.Clock() creates a new clock object. But when I took a look at the time module, I didn't find a class by the name of Clock so I could I have an object? All I found was a function and it was …

Member Avatar for redyugi
0
45
Member Avatar for Joeflims

Hello. I am a n00b learning to code in Python. Right now, I am working on functions and parameters. To practice, I am making a simple Celsius-to-Farenheit converter. However,whenever I run the program it returns a NameError. I am confused in my n00bishness. Please reply. Here is my code: [CODE]>>> …

Member Avatar for Joeflims
0
127
Member Avatar for rehber344

hello every one for example ıf we say a=None if is it same thıng ? ===> if a orrrr if a is None and the reaction of the code is it same thansk ın advance

Member Avatar for redyugi
0
68
Member Avatar for JDuch

""" Hi i intended to list the built-in function using this function. It seems however to give me the results corresponding with a dictionary. Why is that ? """" [CODE] def showbuiltins(): """ saves the list of built in functions to a file you chose """ blist = dir(__builtins__) print …

Member Avatar for JDuch
0
184
Member Avatar for PythonNewbie2

Let's say I have my own installer for a product that uses a lot of other components. One piece of my product is a python script. However, most of my end-users don't have python installed already. Is there any way I can include the python installer as part of my …

Member Avatar for Beat_Slayer
0
186
Member Avatar for lewashby

[CODE]import pygame from pygame.locals import * from sys import exit from random import * pygame.init() screen = pygame.display.set_mode((640, 480), 0, 32) while True: for event in pygame.event.get(): if event.type == QUIT: exit() screen.lock() for count in range(10): random_color = (randint(0, 255), randint(0, 255), randint(0, 255)) random_pos = (randint(0, 639), randint(0, …

Member Avatar for TrustyTony
-1
302
Member Avatar for Kruptein

Hey, I've been not so active for the past months, but that's because I was working on a litle project called Deditor. It's a text-editor for linux. The thing that makes it special is that it is made for python and thus has some python-specific features like, syntax-highlighting, interactive interpreter, …

Member Avatar for redyugi
0
97