Forum: Python Feb 11th, 2009 |
| Replies: 2 Views: 597 You may find your router has a 'virtual server' set up of some kind, if it has then it will allow you to add incoming requests to the list. This will give you the option to have you router watch the... |
Forum: Python Feb 8th, 2009 |
| Replies: 4 Views: 4,369 Should be noted that this can be prevent by doing the following print "Hello World",Yup a trailing ','
:)
Chris |
Forum: Python Jan 15th, 2009 |
| Replies: 2 Views: 514 Also a starting point would be nice...so we can point out where you have gone wrong.
Chris |
Forum: Python Jan 15th, 2009 |
| Replies: 8 Views: 1,687 You may find this helpful
http://www.voidspace.org.uk/python/movpy/movableidle.html
Chris |
Forum: Python Dec 8th, 2008 |
| Replies: 15 Views: 892 Make the delay bigger, thats the idea behind wx.media.MEDIA_LOADED event it triggers when the media is loaded and only then, unfortunately it seems poorly documented.
Chris |
Forum: Python Dec 7th, 2008 |
| Replies: 15 Views: 892 OK, here is my sugestion...please bare in mind i know nothing about Python GUI and event handling so i cannot really provide any sort of code examples.
You need to ensure that the media has loaded... |
Forum: Python Dec 6th, 2008 |
| Replies: 4 Views: 931 This is a common problem, it seems you have to manually include the mail module, this link maybe of help to you
http://stackoverflow.com/questions/169897/how-to-package-twisted-program-with-py2exe
... |
Forum: Python Dec 6th, 2008 |
| Replies: 4 Views: 574 So your set and know what you are doing. Trying coding something then coming back with specific problems
Chris |
Forum: Python Dec 4th, 2008 |
| Replies: 4 Views: 574 Well what idea's do you have for writing a jump function. I guess you would have to think about a couple of things, What exactly is your motion path when you jump, how the direction of movement... |
Forum: Python Dec 1st, 2008 |
| Replies: 7 Views: 552 Hehe glad you got it working.
To think i've only ever downloaded wxPython & created a basic window with a listbox on it. I've never even added data to that list box hehe. Ah well it's all good... |
Forum: Python Dec 1st, 2008 |
| Replies: 7 Views: 552 Hmm thats odd. I did think about the SendKeys module but i wasn't sure if you wanted to use it or not.
Addressing your other issue, did you try using... |
Forum: Python Dec 1st, 2008 |
| Replies: 4 Views: 504 Yer thats normally the case, every programmer i know gets rusty after not using something for a short period of time.
I've breifly looked into threads whilst i was developing a chat application... |
Forum: Python Dec 1st, 2008 |
| Replies: 4 Views: 504 This looks to me like you are going to be going into threads and mutex. You should have a good look on google on how to use threads.
You could spawn a new thread to control the Opponents attacks,... |
Forum: Python Dec 1st, 2008 |
| Replies: 7 Views: 552 Hmm i see your point, i cannot find a method of creating a wxKeyEvent event which is what is required for EmulateKeyPress().
Another possible solution would be to use
... |
Forum: Python Nov 30th, 2008 |
| Replies: 7 Views: 552 Could you use EmulateKeyPress() after that to send a backspace to it?
Chris |
Forum: Python Nov 29th, 2008 |
| Replies: 2 Views: 533 Yes there is it's pretty simple too
mylist = ['blue', 'red', 'green', 'green', 'red', 'red']
for word in set(mylist):
print word, "appears", mylist.count(word), "times."
Hope that... |
Forum: Python Nov 26th, 2008 |
| Replies: 1 Views: 411 The logic behind the memory is not too complex. At the start of the game Create a list containing all of the sequence. And then compare the button press with the value in the correct list position.... |
Forum: Python Nov 25th, 2008 |
| Replies: 2 Views: 1,479 create a list of which characters have been hinted and check the new hint doesn't match any of the previous.
You can also limit people to X amounts of hints too
Chris |
Forum: Python Oct 5th, 2008 |
| Replies: 9 Views: 4,270 Your asking for a full code solution to your assignment? I think you may be going wrong there
Chris |
Forum: Python Oct 5th, 2008 |
| Replies: 3 Views: 530 I'm not sure if i understood you but i think you are after something like this, windows only all i could find
http://www.rutherfurd.net/python/sendkeys/ |
Forum: Python Oct 4th, 2008 |
| Replies: 8 Views: 771 Ofcourse he would have to create a main function containing all of his program.
Depending on how py2exe works it may be needed for the program to initialize correctly |
Forum: Python Oct 4th, 2008 |
| Replies: 8 Views: 771 Try using this
if __name__ == '__main__':
main()
That may help. I'm guessing you are familiar with it, and therefor i don't need to explain
Chris |
Forum: Python Oct 1st, 2008 |
| Replies: 5 Views: 677 The reason your code got shifted to the left was because you didn't use code tags, another thing pointed out in posting guide lines |
Forum: Python Oct 1st, 2008 |
| Replies: 4 Views: 1,008 Yer thats the correct line endings for each different OS, and if you intend to have it portable make sure you do some kind of check as to what os is running and append the correct line endings... |
Forum: Python Sep 30th, 2008 |
| Replies: 6 Views: 1,379 You guys really should have a good read up on Threading and follow the example given it will work fine for you |
Forum: Python Sep 28th, 2008 |
| Replies: 6 Views: 708 # adding to christ o'leary's fight function
# to have integer returned use
# x = random.choice([0, 1])
# print x, type(x) # testing
# or x = random.randrange(0, 2)
# print x, type(x)
import... |
Forum: Python Sep 27th, 2008 |
| Replies: 6 Views: 1,289 Good luck to them on that one, as an interpreted language its not exactly the fasted language out there. Although i must say Oblivion use Python very well, but that isn't so much Pygame as far as im... |
Forum: Python Jul 2nd, 2008 |
| Replies: 1 Views: 451 I'm not sure if I fully understand what your problem is. However you may wish to look into
os.walk()
os.path
You may find these helpful in locating and accessing files on a system.
Chris |
Forum: Python Jun 4th, 2008 |
| Replies: 18 Views: 1,533 Tkinter is the easier, and has one big advantage; its standard.
However i personally find hat wxPython is better although slightly harder to learn.
Chris |
Forum: Python Jun 4th, 2008 |
| Replies: 7 Views: 1,750 m= start[0]*60+start[1]
n= finish[0]*60+finish[1]
here there is a problem, start[0] refers to the first character in the string start. so from your exmaple of 14, 12 start[0] would be 1. and... |
Forum: Python May 22nd, 2008 |
| Replies: 10 Views: 912 Sorry for double post.
One thing to notice is that you can probably save yourself space here. Forexampe you have the following script
import time
def myScriptsContents():
#some code
... |
Forum: Python May 22nd, 2008 |
| Replies: 3 Views: 1,236 not a problem, glad i could help
Chris |
Forum: Python May 22nd, 2008 |
| Replies: 10 Views: 912 Your more than welcome
Chris |
Forum: Python May 22nd, 2008 |
| Replies: 3 Views: 1,236 does ctrl + c not work? this is a basic interupt command.
Chris |
Forum: Python May 22nd, 2008 |
| Replies: 10 Views: 912 This section is to do with importing, when a file is run on its own as an indervidual script the contents of this section is run. When the file is imported this section of code isn't run, here a... |
Forum: Python May 22nd, 2008 |
| Replies: 10 Views: 912 do something like this
import time, MyScript
while True:
MyScript.main()
time.sleep(30)
and for MyScript.py
def main(): |
Forum: Python May 22nd, 2008 |
| Replies: 10 Views: 912 perhaps you could run a different script that calls the scripts you want to run every 30 seconds, also if your on windows you could call os.system("cls") from within your script assuming you have... |
Forum: Python May 22nd, 2008 |
| Replies: 2 Views: 531 This is trusting you have python install on your pc. Im guessing you don't since if you did then you could simply double click the file and it would run, if your on windows.
If your on linux you... |
Forum: Python May 22nd, 2008 |
| Replies: 5 Views: 1,240 wxPython, will aid you with GUI so will Tkinter (whic is built it). They will also allow basic graphics. For more detials graphics have a look at PyGame.
Chris |
Forum: Python May 22nd, 2008 |
| Replies: 5 Views: 1,404 You should look into the os module as i suggested as this allows you to do alot of things. here is an example
import os
for path, dirs, files in os.walk("C:"):
print path, dir, files
... |