Posts
 
Reputation
Joined
Last Seen
Ranked #214
Strength to Increase Rep
+9
Strength to Decrease Rep
-2
100% Quality Score
Upvotes Received
24
Posts with Upvotes
24
Upvoting Members
18
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
19 Commented Posts
~207.90K People Reached
Favorite Tags
Member Avatar for sravan953

By putting "s = d / t" before the conditionals would only calculate speed - but what happens when you give speed and distance for example? It wouldn't calculate time. You have to put each individual case within the appropriate conditional branch like Lardmeister did. P.S. This kind of program …

Member Avatar for Smartfitness33
1
14K
Member Avatar for OrcaSoul

Is there a file in the [I]C:\Python25\Lib\site-packages[/I] folder named [I]mechanize.pth[/I] or a folder named [I]mechanize[/I] in that directory? There should be, and the data in [I]mechanize.pth[/I] should simply say "mechanize" (without the quotes).

Member Avatar for Gribouillis
0
612
Member Avatar for vegaseat

For Python 2.x: People seem to overlook the usefulness of built-in functions for handling common issues with lists. A lot of times, [ICODE]filter[/ICODE], [ICODE]map[/ICODE], and [ICODE]reduce[/ICODE] can easily and efficiently serve typical purposes that most people attempt without these. Here's an example of their usage (I use lambda expressions in …

Member Avatar for vegaseat
23
34K
Member Avatar for vegaseat

I don't know if this idea has already been added, but beginners can create an address book. That was the first real project I undertook. Ask the user for: name, address, phone, cell, fax, etc. Then store the data in a .txt file. Let the user search people in the …

Member Avatar for vegaseat
20
18K
Member Avatar for Steph102

The variable [icode]timesflipped[/icode] used for the while loop is undefined before the comparison [icode]while timesflipped < 100:[/icode]. This script should just return a NameError and not run. Here's a fixed version: [code=python] import random coin_heads, coin_tails, times_flipped = 0, 0, 0 timesflipped = 0 # <-- here's what I added. …

Member Avatar for Gribouillis
0
16K
Member Avatar for Mclovin

I'd say split the string into a list and use the filter method: [code=python] file_Name1 = 'abc123de' # store that string as a list of characters L1 = list(file_Name1) # call filter on it using a lambda expression L1 = filter(lambda x: x in '1234567890', L1) # L1 now = …

Member Avatar for Lucaci Andrew
0
2K
Member Avatar for sillyboy

[URL="http://www.youtube.com/watch?v=T5hOzLUa2IM"]Under The Oak[/URL] by [URL="http://en.wikipedia.org/wiki/Candlemass"]Candlemass[/URL] :D

Member Avatar for Helianthus
0
5K
Member Avatar for brandonhorst

Hooray! I got pyHook working with Python 2.6 for Windows. I just downloaded the source and edited a few things, hacked it together and built. As far as I know, it all works with 2.6 :D You'd just need to manually install it to your Python's site-packages directory if you …

Member Avatar for zaphoenix
0
572
Member Avatar for adkool

Firefox 3! I just can't stand IE for the issues I get with it when writing stuff for the web. It always happens that IE buggers up something by implementing it in a non-standard way, which [I]always[/I] complicates things. And for this reason, I shall never show it any love …

Member Avatar for crunchie
2
890
Member Avatar for leegeorg07

If you mean by "Python OS", an operating system that's built purely on Python, then no. As far as I know, that wouldn't work anyway because the interpreter to run Python needs an OS to run on in the first place (?). Correct me if I'm wrong though... And I'm …

Member Avatar for SamarthWiz
0
165
Member Avatar for serkan sendur

Trainspotting One Flew Over the Cuckoo's Nest A Clockwork Orange A Scanner Darkly Fear and Loathing in Las Vegas

Member Avatar for ronnieaka
0
1K
Member Avatar for shadwickman

I'm not sure if this is the best place to post this, but I've noticed a large request for pyHook for Python 2.6. I had a solution to this in a recent thread [URL="http://www.daniweb.com/forums/thread203368.html"]here[/URL], but people are most likely going to miss that. I built pyHook's source for use with …

Member Avatar for bujisky
0
609
Member Avatar for serkan sendur

[QUOTE=serkan sendur;913335]if my best friends dont get featured i am going to organize them to leave for a better c# forum where their skills are appreciated.[/QUOTE] I'm not trying to start slinging shit here, but is this a mutual agreement or are you just putting words into your friends' mouths? …

Member Avatar for jephthah
1
362
Member Avatar for jabbadabba

First, your whole_thing variable should be [icode]text_file.read()[/icode] if you want to return all the contents as a string. Or [icode]text_file.readlines()[/icode] if you want to return all the contents as a list of each line. Change this and see if that fixes any problems with your code. I don't fully understand …

Member Avatar for rueth
0
829
Member Avatar for shadwickman

Hello, I was wondering how to go about having a redirect of stdout with Python take effect in a C extension. My python script redirects sys.stdout into a file handle created with [i]open(...)[/i], but within the function in my compiled C-extension, any output ([i]printf[/i], [i]puts[/i], etc) is still given to …

Member Avatar for Gribouillis
0
600
Member Avatar for PetuniaRose

@Aia You just strike me as an extremist for your beliefs (Conservative right?). And I hate extremists because they only lead to problems, such as the ones caused by religious fanatics, or by those who are too damn bull-headed to try to even [I]consider[/I] a different viewpoint. You fall into …

Member Avatar for Ene Uran
0
962
Member Avatar for shadwickman

Hello! I have a question in regards to [I]malloc[/I]/[I]calloc[/I] and [I]free[/I] in C. What I'm unsure about is the "depth" (for lack of a better word) that [I]free[/I] operates to. I know that sounds strange so let this example hopefully explain what I mean: [code=c] #include <stdlib.h> int main () …

Member Avatar for shadwickman
0
124
Member Avatar for jbennet

And before anybody makes a comment about either the shades or the colourful bedsheets in the background, they are my ex girlfriend's, hence the feminine tinge to them.

Member Avatar for hotmatrixx
0
248
Member Avatar for EAnder

Hello EAnder - welcome to DaniWeb. I myself only got into Python about a year ago, after deciding to give up on Java and C++; luckily I found that Python is fast, easy, and most importantly, fun. Anyways, to get back on topic, I created the basis for a sort …

Member Avatar for lrh9
0
153
Member Avatar for BenOwns

C++ is among the top of the widely used languages for games. It retains the quick execution speed of C, and brings in much needed and required things such as objects and class inheritance ([URL="http://en.wikipedia.org/wiki/Object-oriented_programming"]OOP[/URL]). Naturally, you'd be using graphics libraries with this, such as OpenGL or DirectX. Possibly even …

Member Avatar for monjes
0
126
Member Avatar for shadwickman

Hello, I know you probably get quite a few threads asking this, but the DaniWeb search didn't pull up what I was looking for. So here we go: I have a page that I've made as "private" by including my access control script at the top. The access control script …

0
99
Member Avatar for vmanes
Member Avatar for johnvitc
0
119
Member Avatar for klabak85

Sneekula's correct. You're storing each item in the [I]inComments[/I] like so: [icode](lineNumber, lineText)[/icode]. So you just need to access the correct index of the tuple, the same way you would access an item in a list (or Array in Java); just use the square brackets to get the value from …

Member Avatar for jice
0
146
Member Avatar for lifeworks

Python is a good choice for easy-going desktop application development. Of course, you're going to want to get adjusted to and familiarized with classes, methods/functions, etc. before starting on GUI projects. And for GUIs, I'd still really suggest wxPython over Tkinter. I personally can't stand the non-native look of Tk's …

Member Avatar for sravan953
0
165
Member Avatar for Merlin33069

[QUOTE=Merlin33069;916033]ive looked around for some tutorials and cant find a lot, really all i need is a 2d environment, laid out kind of like a computer desktop, different functionality in different areas of the screen, maybe some layers for different things[/QUOTE] Sorry, what exactly do you mean by this segment? …

Member Avatar for BlackPhoenix
0
151
Member Avatar for shadwickman

Hello, I am currently trying to figure out some event stuff with Javascript. I have the page capturing all [I]onkeypress[/I] events by calling my function [I]keyPress[/I], and passing the event as an argument. The key presses get passed to a text field that I have on the page (even if …

Member Avatar for codejoust
0
158
Member Avatar for lllllIllIlllI

It would be nice if you explained the code above rather than just plopping it down on the page.

Member Avatar for shadwickman
0
248
Member Avatar for shadwickman

For some reason (this hasn't happened to me in the past), any wxPython scripts I package via py2exe crash on my other Windows computer (lacking a Python install). If I try running it on my other machine, I get an error message telling me to look at a log file …

0
88
Member Avatar for Zagoalie

I started reading through an article on gamedev about creating a game engine from scratch; a basic game engine, written in C++ and using SDL for the graphics. It's a start, and I think after being able to successfully understand and create one like in this article, you can attempt …

Member Avatar for MetalBlaze
-1
146
Member Avatar for shadwickman

Hello, I've just recently tried to make a class template whose constructor should be able to accept a variable amount of arguments of the class passed to the template. I have something like this, with the prototype inside the class definition, and the actual implementation of the constructor defined outside: …

Member Avatar for shadwickman
0
166