Search Results

Showing results 1 to 14 of 14
Search took 0.01 seconds.
Search: Posts Made By: Murtan ; Forum: Python and child forums
Forum: Python 4 Days Ago
Replies: 2
Views: 182
Posted By Murtan
Lets try to describe the problem better...

Is the problem:
a) search the directory for a file name
b) search a specific file for string data
c) search all of the files in a directory for...
Forum: Python Apr 9th, 2009
Replies: 3
Views: 327
Posted By Murtan
You're having an entity vs value comparison issue:


a = [[1,2],[2,0]]
b = [2,0]
aa = a[1]
# at this point, b = [2,0] and aa = [2,0]
# but aa == b returns False

# aa[0] == b[0] returns True
Forum: Python Mar 9th, 2009
Replies: 62
Views: 394,745
Posted By Murtan
I was working on revamping the code...most of it would need changes to work with the classes.
Forum: Python Mar 8th, 2009
Replies: 62
Views: 394,745
Posted By Murtan
Ok, I'm going to post this...I've started it several times and then you post a significant rewrite of your code and to help you I have to toss this stuff out.

You can use the idea and expand on...
Forum: Python Mar 7th, 2009
Replies: 62
Views: 394,745
Posted By Murtan
If you're having a problem with part of the code, please be specific as to what the problem is. What did you see? What did you expect to see?

If it is a compile problem, include the full text of...
Forum: Python Mar 4th, 2009
Replies: 62
Views: 394,745
Posted By Murtan
Just as a side note, you could make the game a lot easier (potentially faster too) if you would let the user select things by number.

For example when selecting "battle" "shop" or "exit" if the...
Forum: Python Feb 28th, 2009
Replies: 62
Views: 394,745
Posted By Murtan
I would reset the player and monster health at the start of the battle.

The weapons would make a good class, the weapon has a name, a cost and an amount of damage. Then you could make a list of...
Forum: Python Feb 7th, 2009
Replies: 4
Views: 597
Posted By Murtan
@starzstar

I think the module you're looking for it getopt

It is designed to parse command line arguments and handles the type you indicated.

@keerthihm

You should probably have started...
Forum: Python Jan 21st, 2009
Replies: 4
Views: 945
Posted By Murtan
On line 2, r is coming from the values in the dictionary, not the keys.
So you can't use it as a key on line 8, you can't index a dictionary by the definition.

You could either test to see if the...
Forum: Python Jan 8th, 2009
Replies: 7
Views: 689
Posted By Murtan
To do more with the color, you're probably going to want to look at the component parts of the tuple.

For example, the following would count any pixel with more green than red and more green than...
Forum: Python Dec 23rd, 2008
Replies: 3
Views: 1,770
Posted By Murtan
The problem with using "A-" as a variable name is that it is illegal.

You can create a variable A_minus without any problem, but you don't want the user to be inputting your variable names anyway....
Forum: Python Dec 22nd, 2008
Replies: 12
Views: 760
Posted By Murtan
Please, when posting python code, use code=python tags

As I said in my previous messages, you needed to indent more lines to make them part of the loop.


house= ["computer", "laptop", "tv",...
Forum: Python Dec 12th, 2008
Replies: 4
Views: 706
Posted By Murtan
I did some initial review, and I was able to load the library and call hgeCreate using ctypes:

Run this from a directory with the hge.dll in it, I was in the hge181 directory.


from ctypes...
Forum: Python Dec 1st, 2008
Replies: 3
Solved: Pygame help
Views: 598
Posted By Murtan
Your loop starting on line 129 is only one line long (130)

You should probably also indent lines 131 to 147 to the same level as 130 to make them part of the loop.
Showing results 1 to 14 of 14

 


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

©2003 - 2009 DaniWeb® LLC