939 Posted Topics
Re: [QUOTE=SoulMazer;1076370]Okay, well I've been looking for at least an hour now for some straight-forward python-xlib documentation, and I have been unable to find any. Luckily...I have quite the easy problem. If somebody would be able to help me create a simple script that would say "Hello" every time the left … | |
Re: Hey I think I'm pretty good with Python, would love to be shown otherwise. Sign me up (weekends only)! | |
Re: [code=python]lines = text.split("\n") for i, l in enumerate(lines): print "line %d: %s" %(i + 1, l) [/code] ![]() | |
Re: Could you give me an example? I think I have an idea what you mean, but I'm not sure. | |
Re: Guess I know whom [I]you [/I]voted for. | |
Re: WOw this is an old thread, but it is possible to launch the default email program with a new message window wih this code: [code=C#] System.Diagnostics.Process.Start("mailto:foo@bar.info"); [/code] the when Windows sees the mailto protocol it opens the associated program. The program will open a new message page only (Well that's … | |
Re: [QUOTE=mn_kthompson;1047514]I guess it depends on what you mean by simplify. If you mean fewer lines of code, then yeah there are ways to simplify it. If you mean make the code more readable so that the next person who has to maintain your code will be able to, then probably … | |
Re: When it comes to writing parsers, I tend not to write parsers at all and rely on parser generators like Wisent. Anyway, care to show us the code of what you'll already doing? | |
I have a 1 year old dv9920us laptop that is refusing to boot into Windows Vista. The Vista "loading screen" appears, but the marquee doesn't and the laptop is perpetually stuck in this state. I was able to boot into live Linux and access my hard drive form there, so … | |
Re: This isn't really a problem, but if it were, it would be quite a nice one to have. | |
Re: Not this insufferable RMS propaganda again. | |
Re: Yes. Spare the rod and spoil the child! Of course, any parent who beats up their children deserves to be thrown in jail. Put the child over your lap and a few slaps from the wrist will teach him/her a lesson. You don't even have to be harsh about it. … | |
Re: [QUOTE=vnproduktionz;1028310]im taking a class in python but i just cant keep up with the curriculum. Some things confuse me so i was wondering if anyone have any websites or anything that can help me get through python or at least help me understand it easier. the book im using right … | |
Re: You bastards! Vote for FIFA! If we wanna talk numbers: [QUOTE]715.1 million individuals watched the final match of this tournament (a ninth of the entire population of the planet).[/QUOTE] About the world cup, from it's wikipedia article. You should consider that this figure does not include inflation for any of … | |
Re: Well, it's [I]bad[/I] OOP. Not that I actually think that everything has to be OOP mind you (some small programs are just better off without it), but take for example your methods list. Why is your class directly manipulating an external object which it does not own (or was not … | |
Re: Sure, C++ is difficult for a beginner, but I recommend you go with it first *if* it is the only one being offered at your school. You will have the benefit of face to face support from your lecturers and peers (nothing beats that!). You may as well get it … | |
Re: Python.org supposedly loves spam anyway, so long as you include some eggs. | |
Re: Convert them all to lower case before using ord: [code]l = l.lower()[/code] | |
Re: Not really sure what exactly you're trying to do... | |
Re: [QUOTE=R1pperZ;1006279]Well said why do we trouble ourselves with such incompetant software? Well the fact that you have to face is the majority of the computing public are tech lazy, they want things to work with little to no action on their part and look good doing it. Plus most people … | |
Re: [code=python] locals_dict = locals() for i in range(1, 10): var_name = "POS" + str(i) if i == POS: locals_dict[var_name] = "->" else: locals_dict[var_name] = " " [/code] discalimer: That code uses hacks and the purists may have your head for it. | |
Re: Huh? You've said what you've done, but not what you're trying to do... | |
Re: I'm afraid you can't do that. That is why many people use flash for embedded games and applications. What you need to do is re-write that application/game for a web platform. Some notable web platforms are: Flash Java Silverlight If you are not the author of this game, then your … | |
Re: What a bunch of nerds. | |
Re: I'd like to see you try to implement one of the existing encryption algos, much less to coming up with your own. Thought so. | |
Is there an open source (lgpl, bsd, mit) math parser/lexer library available out there? Has anybody ever written one by themselves (with support for variables, exponents, grouping) and have some tips/hints? | |
Re: You'd think that before trying to write a desktop environment, one would actually learn up a bit about xlib and how it works. I can answer your question, but I don't want to. Feels a bit like fanning the flames that will eventually blow up in your face. | |
Re: Where is the cTurtle website? Do they have a .tar.gz source distribution? If they do try downloading, untarring and running [icode]python setup.py install[/icode]. Also, make sure that you are running the correct version of python for the version of cTurtle that your are trying to use. | |
Re: WOMEN LIVE LO(NGER THAN MEN?! Now I have to think up a whole new way to get back at her! :( | |
Re: Who the hell answers a yes or no question with an essay? | |
Re: No. b'\x01\x02' Is a byte string in python. The expression [icode]bs[x][/icode] means that you want the [B]byte[/B] at position x in the bytestring x, while [icode]bs[a:b][/icode] means that you want the part of the byte string from a to (but not including) b. Not the difference: indexing gives a byte … | |
Re: [QUOTE=Gribouillis;983820]More exotic [code=python] from itertools import takewhile, count c = sum(1 for b in takewhile(lambda x: x != a, (int(random.triangular(1, 100)) for x in count()))) [/code][/QUOTE] You actually think that is more exotic? Wow. | |
| |
Re: Okay, I will, but first give me [B]one[/B] reasonable use for this technique. | |
Re: [QUOTE=paulthom12345;978967]Hi guys, I have been programming in python for just a bit over 2 years now. Being quite apt at it i was wondering, what can you do to really extend yourself in python? We have a lovely thread in the Projects for Beginners, but in some ways i have … | |
Re: It would be sad to watch if it wasn't so amusing. | |
Re: Hah, this one made me chuckle. | |
Re: Wait, wait, this is funny! | |
Re: >>>I would love to see next official Ubuntu based on KDE4. I believe it will be more dynamic in content, fresher in look and feel and most of all, it will make Windows-users feel more at home -- which is likely to bring in more converts to Ubuntu (and Linux)! … | |
Re: [Citation needed] | |
Re: I actually agree with Mr. Hess (and I don't usually). I don't care what O.S. my cell phone runs either. | |
Re: Calling them 'attacks' is a bit of an exaggeration, isn't it? As someone who admittedly tends to support MS more than I do Apple, I was quite disappointed when that lady bitterly exclaimed "I guess I'm not cool enough for a Mac!" or something like that. Why would they want … | |
Re: Once again Mr. Ken Hess demonstrates his awesome sense of humor. As someone who clearly loves open source (and not just caught up in the religious fanaticism that it sometimes can drive), surely he is familiar with one of its most famous traditions: release early, release often. It would be … | |
Re: I'm sorry, how can anyone take this seriously? This article is obviously a joke. Take for instance: "What changes has Microsoft made to compete with Linux?" Assuming the writer is talking about the desktop arena (and from the rest of his post I would say he is), he either has … | |
Re: Fanboys will be fanboys. Nobody even mentioned Ms until you came along. | |
Re: Ah naive me. I thought the days of nasty Windows infections were over. | |
Re: My daniweb password is 12345. I don't see what the big deal is. | |
Re: Apparently Microsoft can afford to shell out $20 billion for Yahoo Search. They must be doing rather well :icon_confused: . |
The End.