74 Posted Topics
Re: well, thats some interesting code you've got there, and quite a few errors indeed, but most seem to be simple. for starters, you want the section at the top: [CODE] print ''' TEXT KWON DO The ultimate text based martial arts tournament! Created especially for the many fine folks at … ![]() | |
Hi, As strange and pointless as this sounds does anybody know how to, or where to obtain a program that could "invert" the colors on the monitor, i know you can invert the colors using the magnifier but i'd like the whole screen to just be inverted, again strange as … | |
Re: hmm, are you using 'len' as a variable anywhere else in your program? Check to see if you are using 'len' as a variable in your program, because thats where i get the error: [CODE] dic = {1:1,2:2,3:3,4:4} print len(dic) def main(): print len(dic) len = len(dic) if __name__ == … | |
Re: Hello there, i've been playing around and this seems to have the right result for me: [CODE] AttackerWins = 0 DefenderWins = 0 if HighestAttackerRoll > HighestDefenderRoll: AttackerWins += 1 else: DefenderWins += 1 if SecondHighestAttackerRoll > SecondHighestDefenderRoll: AttackerWins += 1 else: DefenderWins += 1 print "\nOutcome:" print "Attacker Wins … | |
hi, i'd like to create something that basically grabbes information from websites, however i havn't any experience in urllib (apart from very basic page reading) and the issue is that the page i want to grab data from checks to see if another page is connected to it or perhaps … | |
Re: [QUOTE=vegaseat]Looks like a nice program. On my computer (OS = Windows XP) the last tkMessageBox.showinfo() prevents any focus on entry1, no cursor! Strange indeed![/QUOTE] very nice indeed, but i have the same issue, (running windows xp) except it does it to me straight away. | |
Re: Here is an example error: [CODE] >>> List = ['item1','item2','item3'] >>> for item in range(10): print List[item] item1 item2 item3 Traceback (most recent call last): File "<pyshell#7>", line 2, in -toplevel- print List[item] IndexError: list index out of range >>> [/CODE] if you look at the traceback bit it tells … | |
Re: the half a second delay can be done either using: [code] import time time.sleep(0.5) [/code] that would be the simplest however the whole code including the GUI would hang as if it crashed, so a slightly more complicated method is doing a while loop, checking the time on each pass, … | |
I'm trying to use the google/python api, but i keep getting this error thrown at me: HTTPError: HTTP Error 407: Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy service is denied. I also get this error when trying to use … | |
Re: hmm, what do you mean by include? you can import into your programs using: [code] import 'module name' [/code] | |
Re: i think the following code may solve your problem, it was thought up by a friend of mine, i merely did the typing, so i take no credit, but i think this is your solution: [code] def main(): string = "abcd" k = len(string) a = 0 SubStrings = [] … | |
Re: i'm not sure i understand, whats wrong, your code? or is there something else you want to do after?? | |
Hi, I've got a small program, that would be really useful if it could stay on top of other windows programs, i don't think there is a method for that in Tkinter, if anyone has any experience or ideas on this topic, please let me know thanks | |
Re: your putting ':' after the def WordCount() line arn't you, simple i know, but just checking... | |
i don't understand the use of the os.popen function, i've used it to read things, for example: [CODE] >>> a = os.popen("netstat") >>> for line in a.readlines(): print line Active Connections >>> [/CODE] i understand that, but there is also a buffersize and a write ability, but i've played about … | |
Re: hi, The following code is the find function part of your code but with part of the solution it now prints the index (location) of the begining of a string or letter but i havn't a clue how to highlight text. [CODE] def find(): findStr = tkSimpleDialog.askstring("Find", "Find:") # Prompts … | |
Re: not too sure what you meant mate but [U][url]www.pythonware.com[/url][/U] has a great documentation for Tkinter, here's a link to a page on the site that may or may not help you: [U][url]http://www.pythonware.com/library/tkinter/introduction/x953-menus.htm[/url][/U] | |
Re: [QUOTE=hammy]Well I already have 3ds max, and know how to use it, but it doesn't work for what I need it for. You can only make the given shapes (Sphere, teapot, cilinder for example). I'll check out those other programes though, thanks :)[/QUOTE] So your telling me that when they … | |
How do i access or call system commands (can't really think of a better thing to call em???) for example on explorer you can right click on an object and select eject, or format ect ect (mainly eject is what i want to know about) any help would be greatly … | |
Re: hmm well i've little experience with pygame myself but are you sure your not missing something in your code? i think you need to type stuff like pygame.init() and you have to flip the display stuff like that, like i said i'm not too sure but if you go on … | |
Re: I'm not very certain on classes and stuff like that myself but i'm guessing and from what i've read i think if you do [CODE] class namehere(calender_name): stuff here [/CODE] can't guarantee it will work (not on my computer so i can't get at python to try it) but it's … | |
Re: havn't got an example, but my very rough guess is maybe you could do something along the lines of; wrap a function around the time.sleep() function that when called it starts the sleep in another thread so that the program will only continue untill; sleep ends, thread gets killed (stoppped) … | |
I want to read everything from a file using python. the one problem i am having (note: EVERYTHING from a file) is that python is returning an EOFError when i know that it's not the end of the file, is there any way to just read the damn thing till … | |
Re: just use clean python: [CODE] >>> a = 5 >>> b = 4 >>> a, b = b, a >>> a 4 >>> b 5 >>> a = 'text1' >>> b = 'text2' >>> a, b = b, a >>> a 'text2' >>> b 'text1' >>> [/CODE] |
The End.