939 Posted Topics
Re: [QUOTE=The_Kernel;885287]index = sorted_keys.index('g')[/QUOTE] No. | |
Re: [QUOTE=paulthom12345;885569]I dont know if its just me, but that dosent quite make that much sense.[/QUOTE] It's not just you. | |
Re: Just run the installer. Oh wait, you expected more detailed help? Ask a more detailed question. | |
Re: How do you mean it doesn't work? What sort of behavior are you seeing? | |
Re: [QUOTE=luvnbigd1111;876624]Narue, someone already helped me before I got your suggestions. I am new to Daniweb, and I didn't want to search for other people's answers. I wanted to call someone and get a new interview, and I got that. What gives you the right to put people down? Does it … | |
Re: But it's so useful for expressing disdain when there's nothing you can actually add to the conversation! | |
Re: If you've written the script with IDLE, the best (and easiest) way to run it is by pressing F5 inside IDLE (once you've got the file open). If you've written it with some other editor, then you need to go into Window's vista command prompt, navigate to the folder where … | |
Re: Most likely issue is a firewall. After that there's routers (port forwarding stuff) and proxies. Are you trying to connect over the internet, or on the same subnet? | |
Re: If you want to just find out if one string is contained inside another: [code=python] strvalue1 in strvalue2[/code] If you want to find out how many occurrences of one string there are in another: [code=python]num = strvalue.count(strvalue2)[/code] If you want to find the index of the first occurrence of one … | |
Re: [QUOTE=Aia;877430]It is known that by the mouth dies the fish when it opens it to bite the hook. I say your mouth is your downfall. With such comments, you show everyone you don't have class; ...ridiculing your spouse for the sake of a cheap laugh. And I don't have trouble … | |
Re: Wait. Have you actually learned how to program with python yet, or are you hoping to just pull this one out of your butt? | |
| |
Re: Have a look at easy bcd (google it). Use it to reset your mbr to use the vista loader, and then once you have verified that your mbr is in tact (and on the correct partition!), you may delete/recover the partition that you gave to 7. | |
Re: [icode]return " ".join(hint)[/icode] creates a string by joining strings in the list, separated by a space. For example, if you have the following list you strings: [code] ["black", "white", "black"] [/code] then you would end up returning [icode]"black white black"[/icode]. Now when you go to your loop, assuming that self.hints … | |
Re: Or if you want to be especially clean: [code=python] try: lightblue.obex.sendfile(device.getAddr(), c[1],"advertisement.jpg") except lightblue._obexcommon.OBEXError, error: if error.args[0] == 111: print "Connection refused!" elif error.args[0] == 11: print "Resource temporarily unavailable!" else: raise error [/code] | |
Re: This behavior is consistent with most other applications I believe. It may have something to do with the way input is handled by the Operating System. | |
Re: I agree that movie ratings tend to seem inconsistent. That said I too don't enjoy much gore in the films I watch. In fact there are about four classes of movies that I enjoy: 1. Good comedy with good pedigree. (I generally won't gravitate towards a film advertised as a … | |
Re: That's because on each loop you overwrote isolated_lines. maybe you meant [icode]isolated_lines += line[/icode]. However, here is my interpretation of your code: [code=python] source = open("F:\\tester.txt") dest = open('F:\\write_it.txt', 'w') for line in source.readlines(): if "1585" in line: dest.write(line) source.close() dest.close() [/code] I like it better 'cause it's more pythonic … | |
Re: What format are the recorded waves in? A binary stream, or? | |
Re: Yes whitespace is part of the syntax. Make sure that you are indenting each block (anything that you would normally put between {} in C). | |
Re: Don't know about wx, but check out: [url]http://docs.python.org/library/winsound.html[/url] | |
Re: The best way I think is to get a solid foundation in Python 2. That and read up a bit on unicode. Once done, you can just read the "What's new in python 3" page (Google it) and learn everything there is to know about using python 3. | |
Re: All of those are available for python 2.6 Reset python 2.6 and default and then open terminal and run this command: [code] sudo apt-get install python-numeric python-imaging python-opengl python-tk python-pmw [/code] When prompted for your password, provide it. If you're ever unsure about what package you need to install, do … | |
Re: I can't seem to find a way to get the width of the image (which is a little retarded). If you can find the width and I'm just a giant noob, then you can code it something like this: [code=python] x = 0 y = 0 for pixel in i.getdata(): … | |
Re: You would need to use a file or database. While I rarely use it myself, by pickling/shelving you can store most kinds of python objects (including lists) in files and then retrieve them later. You can google search python pickling for more details on how to do this. | |
Re: I feel sorry for you. [code=python] def checkLetter(word): solvedString = "" letterGuessed = "" redundancy_checks = [73, 32, 119, 105, 108, 108, 32, 110, 111, 116, 32, 97, 115, 107, 32, 115, 116, 114, 97, 110, 103, 101, 114, 115, 32, 116, 111, 32, 100, 111, 32, 109, 121, 32, … | |
Re: [url]http://www.crummy.com/software/BeautifulSoup/[/url] and my own: [url]http://www.tejerodgers.com/snippets/2009/python-class-webpage/[/url] The source code might give you some ideas | |
Re: [QUOTE=Ancient Dragon;867948]I have a good friend I've known for 20 years who is from India and I still can't pronounce is name correctly! [/QUOTE] Dude, you really should learn to pronounce his name right. | |
Re: Oh my God, man; have you never heard of lists and loops? row0, row2 etc. can become a list of lists called rows, and that code where you explicitly print each element of each row can be put into a simple loop. No, this doesn't solve your problem, but code … | |
![]() | Re: [QUOTE=swain;871525]am looking for program that asks for a password and if that password is correct it will show a short story and if it is incorrect show not in assemply please help[/QUOTE] You should try not to dig up old threads and append questions to them. Instead, create your own … ![]() |
Re: Who knows? Care to share what unexpected behavior you are observing? | |
Do I do it like: [code=C] wchar_t *str = L"12345"; [/code] because that doesn't seem to be working. | |
Re: Backport it to 2.6 with 3to2 and then use py2exe? :P I dunno, sounds like you're SOL | |
Re: lines 101 - 106 need to lose a tab, i.e., un-indent each of those lines once. | |
Re: If you're one of those people who can learn that way, the go for it. You can actually do it with Python/MySQL using mod_python for apache. Although I think PHP is a better fit for web development (although I think it is an absolutely horrible language, but that's what python … | |
Re: Since you're on Linux I recommend Glade for pyGtk. Go with Glade 3. Works like a charm, easy to use, saves time (bad Windows support though). If you're a kde user, then a better choice might be QT designer, which comes with pyQT. I found it a good bit harder … | |
Re: [QUOTE=Prahaai;858686] I need this overlap to happen AS FAST AS POSSIBLE. I need to overlap matrices with milions of elements, like 1600x1200.[/QUOTE] Don't use straight python for this. Try numpy or write a C extension with Cython or the C API if speed is of utmost importance. | |
Re: [QUOTE]I'm thinking it should be possible since you'd only have to send the raw input commands and have the server process it, then have the server echo back the print lines.[/QUOTE] If this is an [B]http [/B]server, then I don't think it would be possible, or at least easy. That's … | |
Re: A gui toolkit. For the last five months. EDIT: that's 3 months. I can't even count. Makes you wonder if I should even be programming. | |
Re: Nobody is going to want to read your code when you don't use code tags. | |
Re: Don't use python 2.6 Or if you use python 2.6, use the manifest patch included in the latest wxPython distribution. There is a fix for this issue that should come with the next release, but for now you have to use the manifest patch (see the release notes). And as … | |
Re: You have to initialize the variable to something else and check if it changed. [code=c] int x; int y = 4; if (!PyArg_ParseTuple(args, "i|i", &x, &y)) return NULL; if (y != 4) { // non-default argument supplied. } [/code] | |
Re: By deleting his registry keys? Just practise or something. | |
Re: How about this: [code=python] atck = sentbot['attacks'][random.choice('attack1', 'attack2')] [/code] or a more portable way [code=python] attacks = sentbot['attacks'] atck = attacks[random.choice(attacks.keys())] [/code] Are you by any chance using "Python programming for the absolute beginner (Mike Dawson)"? | |
Re: I'm craving some Jell-O |
The End.