Forum: Python Oct 30th, 2009 |
| Replies: 1 Views: 179 I tried to make a leet speak converter, but it outputs characters that I don't even tell it to..
This is what I mean:
(Test run)
Enter something to convert to L337 5P34K: Hi, how are you?... |
Forum: Python Oct 21st, 2009 |
| Replies: 1 Views: 232 I am wanting to create a program that everytime I run it, it gets the current playing tune in iTunes, and sets this as my Facebook status:
"I'm listening to current_playing_song, corrent_artist."... |
Forum: Python Jul 26th, 2009 |
| Replies: 8 Views: 244 I really have no idea why it is doing this, here is the gamemain.py file that is causing the error:
from useful import *
class Menus():
def __init__(self):
pass
def... |
Forum: Python Jul 25th, 2009 |
| Replies: 8 Views: 244 woooee: I right clicked on the error in the python shell, and clicked "Go to file/line" and it took me to the line where I had "Item", but it was telling me that I had spelt it as "item", then when I... |
Forum: Python Jul 25th, 2009 |
| Replies: 8 Views: 244 Hi
I am making a text game, and I have made up a basic framework.
I have 2 questions
1) Sometimes, the python interpreter bugs out, like saying that I misspelt a variable 'Item' as 'item'... |
Forum: Python Jul 22nd, 2009 |
| Replies: 7 Views: 297 Nah, I tested it just then, by opening the same python program twice, and 2 terminal windows showed up :) |
Forum: Python Jul 22nd, 2009 |
| Replies: 7 Views: 297 I could have one .exe which opens the other 2.. |
Forum: Python Jul 22nd, 2009 |
| Replies: 7 Views: 297 What about:
The main program constantly writes to a file the stats of a player, and i write another program to output that stuff
Would it work? |
Forum: Python Jul 21st, 2009 |
| Replies: 7 Views: 297 I am making a text game, and what I want it to have one console window for showing the game, then another one next to it showing the players stats.
Is this possible ?? |
Forum: Python Jul 21st, 2009 |
| Replies: 6 Views: 479 I want to sort a dictionary, say that it was like this:
a_dict = {'2':12354, '1':12355432, '4':35342, '3':858743}
How would I be able to sort it so it's like this:
a_dict =... |
Forum: Python Jul 2nd, 2009 |
| Replies: 12 Views: 504 Thanks guys, it turns out that I had to only put the function name, not call the function. :) |
Forum: Python Jun 30th, 2009 |
| Replies: 12 Views: 504 When I run this code:
import wx
ID_FILE_QUIT = 101
class MainFrame(wx.Frame):
def __init__(self, title):
wx.Frame.__init__(self, None, wx.ID_ANY, title=title) |
Forum: Python Jun 28th, 2009 |
| Replies: 2 Views: 400 |
Forum: Python Jun 28th, 2009 |
| Replies: 2 Views: 400 How would I round a number to the nearest multiple of 10? |
Forum: Python Jun 27th, 2009 |
| Replies: 5 Views: 924 Oh ok cool. I understand that everything in python is an object. |
Forum: Python Jun 27th, 2009 |
| Replies: 1 Views: 256 Whenever I run this code, it always returns an empty list, can someone tell me why this is happening?
## Written by Tom Tetlaw
## Copyright (c) 2009
## Written in IDLE<www.python.org>
... |
Forum: Python Jun 27th, 2009 |
| Replies: 5 Views: 924 for your code, you would have to hade done x = None
what i want is to check if a var has been defined |
Forum: Python Jun 27th, 2009 |
| Replies: 5 Views: 924 How do I check if a variable exists? |
Forum: Python Jun 26th, 2009 |
| Replies: 3 Views: 640 def prints(value, ..., seps='', ends='\n', files=sys.stdout):
print(value, sep=seps, end=ends, file=files)
print = prints
Would this permently overwrite print or just overwrite it while... |
Forum: Python Jun 26th, 2009 |
| Replies: 6 Views: 281 So input() in python 3 returns a string? |
Forum: Python Jun 26th, 2009 |
| Replies: 7 Views: 356 |
Forum: Python Jun 26th, 2009 |
| Replies: 3 Views: 243 it prints them ontop of eachother, because at the end of each print() in the loop, print() automatically prints a newline, to get rid of this just go print('*', end='') |
Forum: Python Jun 26th, 2009 |
| Replies: 7 Views: 356 i am running the worldloader.py file |
Forum: Python Jun 26th, 2009 |
| Replies: 6 Views: 281 First of all, you don't have to do int(input()) because input() returns a number anyway.
And you should start with better explaining the rest of the problem |
Forum: Python Jun 26th, 2009 |
| Replies: 7 Views: 356 i tried what it said on the site but it didn't work
error:
Traceback (most recent call last):
File "E:/Tom's Personal Project/engine/world/worldloader.py", line 6, in <module>
import... |
Forum: Python Jun 26th, 2009 |
| Replies: 7 Views: 356 How do you specify a certain path for the import thing to import?
such as
import "E:\Tom's Personal Project\engine\shared.py"
Any help would be appreciated :) |
Forum: Python Jun 24th, 2009 |
| Replies: 5 Views: 369 Hey thanks everyone, it turns out that I didn't install it properly :P |
Forum: Python Jun 23rd, 2009 |
| Replies: 5 Views: 369 Is there a different version if IDLE for Python 3.0(Python 300, Py3k)?? If there is, how do I download it? |
Forum: Python Jun 22nd, 2009 |
| Replies: 2 Views: 293 i am making a game and i am getting a strange error
heres the relevant code
items = {'sword':['sword', 3, 15],
'axe':['axe', 5, 25],
'bow and arrow':['bow and... |
Forum: Python Jun 20th, 2009 |
| Replies: 6 Views: 396 I also enjoyed this and I'm making my own as well! Thanks for the idea! |
Forum: Python Jun 18th, 2009 |
| Replies: 3 Views: 312 Hmm I've already tried that |
Forum: Python Jun 18th, 2009 |
| Replies: 13 Views: 922 You might have to add the PyGame directory, or the python directory to the systems PATH variable, just google "Windows PATH variable" and you should be able to find out how.
You would just add the... |
Forum: Python Jun 18th, 2009 |
| Replies: 3 Views: 312 Is there a module for a camera in PyGame, because I want the camera to follow an image, thanks. |
Forum: Python Jun 13th, 2009 |
| Replies: 2 Views: 235 Yeah thanks that exactlly what I meant, I also want another seperate image for the background that has nothing to do with the movement of the player, it's just for show, but I know how to use that. :) |
Forum: Python Jun 13th, 2009 |
| Replies: 2 Views: 235 I am using pygame
I want my program to read an image file that only has black on it and whenever the character moves over a part that has black on it, he stops moving, any ideas on how to get... |
Forum: Python Jun 11th, 2009 |
| Replies: 6 Views: 238 Thank you, that got rid of the error, but my file parser is wrong so it always returns corrupted. |
Forum: Python Jun 11th, 2009 |
| Replies: 6 Views: 238 This is the contents of the tpp.ini file:
map = test.png
collision = test_collision.png
playername = defaultplayer
[END_OF_FILE] |
Forum: Python Jun 11th, 2009 |
| Replies: 6 Views: 238 This is my code:
def load_ini():
fout = open('tpp.ini', 'r')
fout.seek(0)
lines = fout.readlines()
p_map = re.compile('map = (.*)')
p_collision = re.compile('collision... |
Forum: Python Jun 11th, 2009 |
| Replies: 6 Views: 238 How do I search a string for anything?
What I mean is, I need to say:
if line == 'playername = (any name)':
temp = line.strip().replace('playername=', '')
return temp |
Forum: Python Jun 5th, 2009 |
| Replies: 1 Views: 336 How do you render a font so that it changes when the variable changes?
This is my code:
##############################
# Copyright lololol (c) 2009 #
##############################
import... |