Search Results

Showing results 1 to 40 of 139
Search took 0.01 seconds.
Search: Posts Made By: tomtetlaw ; Forum: Python and child forums
Forum: Python Oct 30th, 2009
Replies: 1
Views: 179
Posted By tomtetlaw
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
Posted By tomtetlaw
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
Posted By tomtetlaw
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
Posted By tomtetlaw
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
Posted By tomtetlaw
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
Posted By tomtetlaw
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
Posted By tomtetlaw
I could have one .exe which opens the other 2..
Forum: Python Jul 22nd, 2009
Replies: 7
Views: 297
Posted By tomtetlaw
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
Posted By tomtetlaw
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
Posted By tomtetlaw
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
Solved: wxPython Error
Views: 504
Posted By tomtetlaw
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
Solved: wxPython Error
Views: 504
Posted By tomtetlaw
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
Posted By tomtetlaw
Forum: Python Jun 28th, 2009
Replies: 2
Views: 400
Posted By tomtetlaw
How would I round a number to the nearest multiple of 10?
Forum: Python Jun 27th, 2009
Replies: 5
Views: 924
Posted By tomtetlaw
Oh ok cool. I understand that everything in python is an object.
Forum: Python Jun 27th, 2009
Replies: 1
Views: 256
Posted By tomtetlaw
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
Posted By tomtetlaw
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
Posted By tomtetlaw
How do I check if a variable exists?
Forum: Python Jun 26th, 2009
Replies: 3
Views: 640
Posted By tomtetlaw
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
Posted By tomtetlaw
So input() in python 3 returns a string?
Forum: Python Jun 26th, 2009
Replies: 7
Solved: Python import
Views: 356
Posted By tomtetlaw
Thanks now it works!
Forum: Python Jun 26th, 2009
Replies: 3
Views: 243
Posted By tomtetlaw
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
Solved: Python import
Views: 356
Posted By tomtetlaw
i am running the worldloader.py file
Forum: Python Jun 26th, 2009
Replies: 6
Views: 281
Posted By tomtetlaw
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
Solved: Python import
Views: 356
Posted By tomtetlaw
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
Solved: Python import
Views: 356
Posted By tomtetlaw
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
Solved: Python 3.0
Views: 369
Posted By tomtetlaw
Hey thanks everyone, it turns out that I didn't install it properly :P
Forum: Python Jun 23rd, 2009
Replies: 5
Solved: Python 3.0
Views: 369
Posted By tomtetlaw
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
Solved: my text game
Views: 293
Posted By tomtetlaw
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
Posted By tomtetlaw
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
Posted By tomtetlaw
Hmm I've already tried that
Forum: Python Jun 18th, 2009
Replies: 13
Views: 922
Posted By tomtetlaw
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
Posted By tomtetlaw
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
Posted By tomtetlaw
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
Posted By tomtetlaw
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
Posted By tomtetlaw
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
Posted By tomtetlaw
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
Posted By tomtetlaw
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
Posted By tomtetlaw
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
Posted By tomtetlaw
How do you render a font so that it changes when the variable changes?

This is my code:

##############################
# Copyright lololol (c) 2009 #
##############################

import...
Showing results 1 to 40 of 139

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC