74 Posted Topics

Member Avatar for mruane

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 …

Member Avatar for Mouche
0
118
Member Avatar for a1eio

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 …

0
55
Member Avatar for katharnakh

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__ == …

Member Avatar for vegaseat
0
2K
Member Avatar for Matt Tacular

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 …

Member Avatar for vegaseat
0
213
Member Avatar for a1eio

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 …

Member Avatar for metabo_man
0
345
Member Avatar for Jayzilla

[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.

Member Avatar for bumsfeld
0
130
Member Avatar for JohnJohnUSA

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 …

Member Avatar for a1eio
0
169
Member Avatar for Matt Tacular

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, …

Member Avatar for a1eio
0
2K
Member Avatar for a1eio

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 …

Member Avatar for a1eio
0
135
Member Avatar for Matt Tacular

hmm, what do you mean by include? you can import into your programs using: [code] import 'module name' [/code]

Member Avatar for a1eio
0
198
Member Avatar for girish_sahani

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 = [] …

Member Avatar for a1eio
0
213
Member Avatar for girish_sahani

i'm not sure i understand, whats wrong, your code? or is there something else you want to do after??

Member Avatar for a1eio
0
109
Member Avatar for a1eio

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

Member Avatar for a1eio
0
22K
Member Avatar for JoshBebbington
Re: Help

your putting ':' after the def WordCount() line arn't you, simple i know, but just checking...

Member Avatar for a1eio
0
128
Member Avatar for a1eio

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 …

Member Avatar for vegaseat
0
3K
Member Avatar for Blujacker

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 …

Member Avatar for Blujacker
0
98
Member Avatar for katharnakh

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]

Member Avatar for katharnakh
0
2K
Member Avatar for hammy

[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 …

Member Avatar for hostingoption
0
246
Member Avatar for a1eio

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 …

Member Avatar for vegaseat
0
345
Member Avatar for TheSkunkMan

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 …

Member Avatar for TheSkunkMan
0
4K
Member Avatar for bumsfeld

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 …

Member Avatar for bumsfeld
0
153
Member Avatar for bumsfeld

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) …

Member Avatar for a1eio
0
296
Member Avatar for a1eio

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 …

Member Avatar for vegaseat
0
504
Member Avatar for nanosani

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]

Member Avatar for Daishi
0
318

The End.