939 Posted Topics

Member Avatar for SoulMazer

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

Member Avatar for SoulMazer
0
586
Member Avatar for ShadyTyrant

Hey I think I'm pretty good with Python, would love to be shown otherwise. Sign me up (weekends only)!

Member Avatar for Gribouillis
0
367
Member Avatar for Garee

[code=python]lines = text.split("\n") for i, l in enumerate(lines): print "line %d: %s" %(i + 1, l) [/code]

Member Avatar for masterofpuppets
0
105
Member Avatar for nizbit
Member Avatar for winmic
0
92
Member Avatar for sknake
Member Avatar for 1qaz2wsx7

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 …

Member Avatar for Seema
0
2K
Member Avatar for J-M DESMETTRE

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

Member Avatar for orinbai
0
3K
Member Avatar for joshSCH
Member Avatar for nizbit

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?

Member Avatar for nizbit
0
128
Member Avatar for scru

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 …

Member Avatar for Xlphos
0
143
Member Avatar for SpectateSwamp

This isn't really a problem, but if it were, it would be quite a nice one to have.

Member Avatar for Bob_180_Bob
0
218
Member Avatar for newsguy
Member Avatar for zandiago

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

Member Avatar for BestJewSinceJC
0
889
Member Avatar for vnproduktionz

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

Member Avatar for vegaseat
0
130
Member Avatar for joshSCH

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 …

Member Avatar for atretrioeciii
0
298
Member Avatar for AutoPython

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 …

Member Avatar for AutoPython
0
216
Member Avatar for nevets04

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 …

Member Avatar for vegaseat
0
215
Member Avatar for AutoPython
Member Avatar for bumsfeld
0
171
Member Avatar for Kruptein

Convert them all to lower case before using ord: [code]l = l.lower()[/code]

Member Avatar for Kruptein
0
9K
Member Avatar for lukerobi
Member Avatar for The Mad Hatter

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

Member Avatar for Evenbit
-5
2K
Member Avatar for AutoPython

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

Member Avatar for AutoPython
0
148
Member Avatar for lukerobi
Member Avatar for vegaseat
0
99
Member Avatar for moonlighter724

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 …

Member Avatar for preemals
0
104
Member Avatar for matthewl
Member Avatar for jtabak2
Member Avatar for AutoPython

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.

Member Avatar for ov3rcl0ck
0
574
Member Avatar for scru

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?

Member Avatar for scru
0
196
Member Avatar for DrakeMagi

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.

Member Avatar for DrakeMagi
0
442
Member Avatar for i are smart

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.

Member Avatar for sneekula
0
252
Member Avatar for majestic0110

WOMEN LIVE LO(NGER THAN MEN?! Now I have to think up a whole new way to get back at her! :(

Member Avatar for quicktpgo
1
268
Member Avatar for tomtetlaw
Member Avatar for foosion

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 …

Member Avatar for foosion
0
205
Member Avatar for nomemory

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

Member Avatar for woooee
1
217
Member Avatar for Salem

Whenever I try to view anyone's profile I get: (see attachment)

Member Avatar for MosaicFuneral
1
984
Member Avatar for mahela007
Member Avatar for lllllIllIlllI

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

Member Avatar for lllllIllIlllI
0
213
Member Avatar for Techwriter10
Member Avatar for happygeek
Member Avatar for newsguy
Member Avatar for khess

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

Member Avatar for Scott82
-1
442
Member Avatar for khess
Member Avatar for khess
Member Avatar for happygeek
0
608
Member Avatar for Techwriter10

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 …

Member Avatar for Techwriter10
0
430
Member Avatar for khess

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 …

Member Avatar for scru
0
164
Member Avatar for khess

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 …

Member Avatar for uliwehner
0
356
Member Avatar for Techwriter10
Member Avatar for F_Fido
0
385
Member Avatar for happygeek
Member Avatar for happygeek
Member Avatar for fire_munki
0
295
Member Avatar for Brian.oco

Apparently Microsoft can afford to shell out $20 billion for Yahoo Search. They must be doing rather well :icon_confused: .

Member Avatar for tiger86
0
171

The End.