851 Posted Topics
Re: You might have to uninstall a partially installed version of eric before reinstalling. I would stick with an IDE that uses wxPython as its GUI toolkit, like DrPython, Boa or PythonWin. | |
Re: I have no idea who this person is, but it is always a sad story to read that someone died of cancer. My sympathy to the many friends of this C programmer. | |
Re: [B][COLOR="Green"]Worship Me![/COLOR][/B] | |
Re: It just doesn't make much sense to give a chicken elaborate rights and then eat it. | |
Re: Wow, even the picture is a fraud. Is anybody honest anymore? The gun looks a lot like my bb-gun. | |
| |
Re: You can create all the lines within one for loop. Your coordinates are incremented in given steps, so you can calculate them in each loop around. It might be simpler to do one for loop for horizontal lines and one for vertical lines. | |
Re: If the cook spits into the food and the waitress puts her finger into the soup, I usually pay only a 5% tip. | |
Re: Read the comments in this example code, it should show you how to solve your problem. [code]# data string for testing data = """\ line one line two line three""" # data list for testing listOfLines = data.split('\n') listofWordsinLines = [] for line in listOfLines: # words is a list … | |
Re: McCain is a very old man, he is bound to have very old skeletons in his closet, so what? He acts like a leader, that is all that counts, and is exactly what the country needs right now. | |
Re: self.tennisPro.append(tennisPro("Roger Federer", "1", "18", "SUI", "Wilson")) needs to be self.tennisPro.append(tennis("Roger Federer", "1", "18", "SUI", "Wilson")) It is customary to start class names with an uppercase letter, this way you may not have made this mistake! | |
Re: So, if a little old lady slips on these things on the floor, you will gladly pay for her broken hip! | |
Re: Here is a good text to try with your spell checker program: Eye halve a spelling chequer It came with my pea sea It plainly marques four my revue Miss steaks eye kin knot sea. Eye strike a key and type a word And weight four it two say Weather … | |
Re: A computer program that replaces all the politicians. | |
Re: [QUOTE=tonyjv;1198523]Can you mark solved or tell what is still unclear/post results?[/QUOTE]You did the person's homework, I doubt he/she will be back. | |
Re: I love Bing, it is far better than Google! I wonder if [B]C Sharp lol[/B] is the new version of C#? May I ought to bing for it. Hehe! | |
| |
Re: Too bad there isn't a count of the quality of a post. | |
Re: I would pick: Don’t take life so seriously you will regret it otherwise and it will be too late. | |
Re: [QUOTE=BestJewSinceJC;1176270]Their seeds are, because they contain cyanide. It is a low amount, but eating a ton of apple seeds could harm you.[/QUOTE]I love apple seeds! What should i do now? | |
Re: I've more than enough red T shirts to last me 3 years, thank you very much. | |
Re: [QUOTE=Ancient Dragon;1144642]Oh well, win some, lose some. Congratulations to Canada for that win. But we still have more medals than they do.[/QUOTE]So, who was the overall winner of that macho event. | |
Re: [QUOTE=jwenting;1146975]Italian justice system has learned to not be corrupt. Had to deal with the Mafia for decades. Maybe Google didn't realise that and tried to bribe a judge...[/QUOTE] Ah, they learned the trade from the best in the field! | |
Re: Since you are not showing any indentations, your question will be hard to answer. For code tags info see: [url]http://www.daniweb.com/forums/announcement114-3.html[/url] | |
Re: Does getting killed by a "Jesus" bomb give you brownie points at the pearly gate? | |
Re: I played it with my cousin, who is a real candy bar bon vivant. She got 18 out of 20. A flash player hickup saved me from absolute washout. | |
Re: Looks like using module glob is pretty cool! This will give a sorted file list: [code=python]import os import glob os.chdir('C:/Windows/') file_list = glob.glob('*.ini') # sort case independent print( sorted(file_list, key=str.lower) ) [/code]Works with IronPython 2.6 too. | |
Re: Sorry, please use code tags around your Python code! Run this code: [code]print("Please enclose your code in code tags like this:") print("["+"code]") print("... your code goes here ...") print("[/"+"code]") [/code] | |
Re: So, if your file eg. numbers.txt contained [B]44 36 11 66 24 92 3 8[/B] you could simply use: [code=python]mylist = [] for line in open('numbers.txt'): sublist = [float(item) for item in line.split()] mylist.append(sublist) # test it print(mylist) [/code]I tested it with Ironpython 2.6 and assume it will work with … | |
Re: [QUOTE=Ancient Dragon;1100347]I've been using that for quite some time.[/QUOTE]How many solved threads to you attribute to that? | |
Re: [QUOTE=vegaseat;1099230]Infinity dear Watson, Infinity![/QUOTE]Does that mean Universes have always been there in one state or another? I simple mindedly understood that Universes come an go, or pulse, or form nodes. I think the question should have been How Old Is Our Universe Right Now? | |
Re: Makes sense with IronPython: [code=Python]data = """\ 01011001 01101111 01110101 00100000 01101011 01101110 01101111 01110111 00100000 01111001 01101111 01110101 00100000 01100001 01110010 01100101 00100000 01100001 00100000 01100111 01100101 01100101 01101011 00100000 01110111 01101000 01100101 01101110 00100000 01111001 01101111 01110101 00100000 01100001 01110010 01100101 00100000 01101001 01101110 01110100 01100101 01110010 01100101 … | |
Re: I like C#, but like to know more about IronPython that feeds into C#. | |
Re: Did you hear that big bang? What a stupid name for one hell of an explosion! | |
Re: If Australia is an actual Democracy, you can vote the bums out of office. | |
![]() | |
| |
Re: A list of [x, y] coordinates could be a useful list of lists. | |
Re: Eventually you will grow a long beard and people will climb the mountain to ask for your advice! | |
Re: [QUOTE=ShadyTyrant;1090123][CODE] prompt = "Did you get your new laptop with windows 7? (y/n) " answer = raw_input(prompt).lower() if 'y' in answer: print "Phantasmagoric!" else: print "Epic Fail" [/CODE] $Did you get your new laptop with windows 7? (y/n): n $Epic Fail[/QUOTE]So what bad did you do so Santa didn't bring … | |
Re: [QUOTE=simonday;1089705]happy to be a part of this community[/QUOTE]I bet you do, so you can spam us with your junk! | |
Re: [QUOTE=fallopiano;1089446]even faster would be: [CODE=python]key = pygame.key.get_pressed() event = pygame.event.poll() # exit if event.type == QUIT or key[K_ESCAPE]: pygame.quit(); sys.exit() # left arrow if key[K_LEFT]: # do something pass [/CODe][/QUOTE]Let's hope you tested out which approach is faster. | |
Re: It will be easier to modifiy the jlm699 code: [code=python]import re regex_compiled = re.compile('^<Ranking: (.*) \((.*)\)>$') input_data = """<Ranking: AA (John)> <Ranking: CA (Peter)> <Ranking: TA-A (Samantha)> """ data_list = input_data.split('\n') # remove any empty list item data_list.remove("") # slice into second to last item data_list = data_list[len(data_list)-2:-1] print data_list … | |
Re: Python also has a raw string designator that ignores escape characters. Simply use initial_drive = r"C:\\" | |
Re: The QTdesigner created code simply looks too strange. I don't think anyone on DaniWeb uses this utility. |
The End.