Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Showing results 1 to 40 of 437
Search took 0.04 seconds; generated 1 minute(s) ago.
Search: Posts Made By: Dietrich
Forum: Python Oct 3rd, 2007, 4:46 PM
Replies: 44
Views: 2,036
Posted By Dietrich
Smile I know this is an old thread. You can look at a...

I know this is an old thread. You can look at a class as just another way to combine things that belong together. There are additional benefits like inheritance, overloading, and instance...
Forum: Python Sep 20th, 2007, 9:27 PM
Replies: 7
Views: 477
Posted By Dietrich
Talking Actually, the GUI toolkit that comes with visual...

Actually, the GUI toolkit that comes with visual C# is pretty dismal. Not much fancy stuff there! The wxPython toolkit can easily run circles around that thing!

In my experience Py2Exe and...
Forum: Python Sep 17th, 2007, 3:07 PM
Replies: 3
Views: 211
Posted By Dietrich
Talking Talking about learning a language, what kind of...

Talking about learning a language, what kind of English is this?

I would say keeping the lectures interesting is most important! Nothing wrong with throwing in some functions or classes early on,...
Forum: Python Jul 18th, 2007, 8:52 AM
Replies: 12
Views: 426
Posted By Dietrich
Talking I figured you would that kind of complex person!

I figured you would that kind of complex person!
Forum: Python Jul 10th, 2007, 1:23 PM
Replies: 12
Views: 426
Posted By Dietrich
Talking I looked at the link, that note is simply a...

I looked at the link, that note is simply a mistake in that case. It is correct if you line up a bunch of variables with commas directly after a print.

Another solution for the OP:
def square(x):
...
Forum: Python Jul 10th, 2007, 1:12 PM
Replies: 12
Views: 426
Posted By Dietrich
Cool Whoever wrote that is full of dung, as it...

Whoever wrote that is full of dung, as it pertains to formatted strings. The space that you have in this example is the one from the format string.

Look at this:
for i in range(1, 6):
print...
Forum: Python Jul 9th, 2007, 3:01 PM
Replies: 6
Views: 419
Posted By Dietrich
Smile "Learning Python" by Mark Lutz & David Ascher...

"Learning Python" by Mark Lutz & David Ascher published by O'Reilly is pretty much the learning standard. Should be in your book store or library.

A nice online...
Forum: Python Jul 4th, 2007, 7:28 PM
Replies: 19
Views: 732
Posted By Dietrich
Talking I find the DrPython IDE very stable, and you can...

I find the DrPython IDE very stable, and you can download a code completion plugin that offers a dropdown list of choices. For instance if you use 'import Tkinter as tk', the moment you type 'tk.'...
Forum: C Jun 28th, 2007, 2:39 PM
Replies: 11
Views: 495
Posted By Dietrich
Talking Time to get into GUI programming and experience...

Time to get into GUI programming and experience those frames, buttons, labels, listboxes, dialogs, spreadsheet grids and notebook pages.
Forum: Python Jun 28th, 2007, 12:10 PM
Replies: 8
Views: 283
Posted By Dietrich
Talking I assume you found the evil function eval(): joe...

I assume you found the evil function eval():
joe = "this is what I want to print"
bob = ["joe"]
print eval(bob[0]) # this is what I want to print
Forum: Python May 1st, 2007, 2:30 PM
Replies: 4
Views: 255
Posted By Dietrich
If your statement block is short, you can do it...

If your statement block is short, you can do it all on one line:
for x in range(1, 11): x *=3; print x
Honestly, the indented way is much more readable!

Hi Fred!
Forum: C# Apr 16th, 2007, 5:43 PM
Replies: 6
Views: 163
Posted By Dietrich
Hmm, how do you show someone your code when it is...

Hmm, how do you show someone your code when it is scattered amongst several files?
Forum: C++ Mar 15th, 2007, 12:41 AM
Replies: 44
Views: 1,074
Posted By Dietrich
I agree with bigK, learn Python. C or C++ syntax...

I agree with bigK, learn Python. C or C++ syntax is just too difficult to read for a beginner that wants to learn on his/her own. Go to the Python.org website and download the latest version I...
Forum: Python Mar 1st, 2007, 6:03 PM
Replies: 2
Views: 192
Posted By Dietrich
How about something like this: def joker(*args): ...

How about something like this:
def joker(*args):
for item in args:
print "%s" % item,

joker("dad", "dasdsad", "dasdas")
Forum: Python Feb 15th, 2007, 12:19 AM
Replies: 9
Views: 344
Posted By Dietrich
You mean this old thing: #include...

You mean this old thing:
#include <stdio.h>
#include <windows.h>

int main(void)
{
HANDLE hConsoleOutput = GetStdHandle(STD_OUTPUT_HANDLE);
WORD wAttributes;
CONSOLE_SCREEN_BUFFER_INFO...
Forum: Python Feb 13th, 2007, 12:54 AM
Replies: 9
Views: 344
Posted By Dietrich
Sorry Sane, that's just ye olde DOS command. ...

Sorry Sane, that's just ye olde DOS command. Looks like you ought to use wxPython then.
Forum: Python Feb 12th, 2007, 2:51 PM
Replies: 9
Views: 344
Posted By Dietrich
Nice to see you back: # change color in the...

Nice to see you back:
# change color in the console display (Windows)
# color is a two digit hexadecimal number
# the first digit is the background
# the second digit is the foreground (text)
#...
Forum: Python Feb 9th, 2007, 6:27 PM
Replies: 4
Views: 209
Posted By Dietrich
First of all read up on unicode...

First of all read up on unicode at:
http://www.python.org/peps/pep-0263.html

Also here is a small code sample I wrote a while ago that might help you in your quest:
# Python supports Unicode strings...
Forum: Python Feb 9th, 2007, 6:11 PM
Replies: 5
Views: 258
Posted By Dietrich
A little primitive and strictly for the very...

A little primitive and strictly for the very beginner of Python, does a lot of handholding:
http://www.daniweb.com/techtalkforums/thread20774.html
Forum: C++ Feb 9th, 2007, 6:03 PM
Replies: 4
Views: 275
Posted By Dietrich
Practically no-one uses SDL.

Practically no-one uses SDL.
Forum: C++ Feb 9th, 2007, 6:02 PM
Replies: 3
Views: 199
Posted By Dietrich
SDL (Simple DirectMedia Layer) should do the...

SDL (Simple DirectMedia Layer) should do the trick.
Forum: Python Jan 14th, 2007, 12:58 PM
Replies: 3
Views: 232
Posted By Dietrich
Python weds C++

I am looking for good information or a tutorial on the use of Python as a glue language with C and C++. Does anyone have experience with that sort of advanced thing?
Forum: Python Jan 13th, 2007, 3:31 PM
Replies: 15
Views: 526
Posted By Dietrich
Found this on another forum: I downloaded the...

Found this on another forum:

I downloaded the little free program as the source file (Python package) and test drove it. By golly, it is nice! An 'almost IDE', actually I can't figure out what is...
Forum: Python Jan 10th, 2007, 5:49 PM
Replies: 15
Views: 526
Posted By Dietrich
If you want to create your GUI layout with a...

If you want to create your GUI layout with a visual drag and drop framebuilder, you can use Boa or wxGlade. A visual framebuilder is in PyScripter's future features list.

Actually, it's easy enough...
Forum: Python Jan 6th, 2007, 11:34 AM
Replies: 4
Views: 228
Posted By Dietrich
Here is an example of using a recursive function...

Here is an example of using a recursive function as a while loop with a name:
def count_to_9(x):
# do something with x
print x
x += 1
if x >= 10:
return
count_to_9(x)

#...
Forum: Python Jan 5th, 2007, 2:07 PM
Replies: 9
Views: 675
Posted By Dietrich
Here are a couple of sites I used for learning...

Here are a couple of sites I used for learning...
Forum: Python Jan 5th, 2007, 1:56 PM
Replies: 4
Views: 228
Posted By Dietrich
There are several ways to stop a while loop: #...

There are several ways to stop a while loop:
# the while loop needs a True condition, here x < 10 to run
# and will stop running on False, when x goes to 10 or above
x = 0
while x < 10:
# do...
Forum: Python Jan 5th, 2007, 1:08 PM
Replies: 9
Views: 675
Posted By Dietrich
Tools for learning Python

Again, this question came from a hijacked thread, but addresses important issues.

I would like to get a feel for programming, can anyone suggest any books or free tutorial websites? I heard that...
Forum: Python Jan 5th, 2007, 12:45 PM
Replies: 4
Views: 228
Posted By Dietrich
Loops in Python

This question came from a hijacked thread. I thought it important enough to put it in its own thread with the proper title.

What loops does Python offer and what are they used for?

I might add,...
Forum: Python Jan 5th, 2007, 12:38 PM
Replies: 30
Views: 889
Posted By Dietrich
Well put Arevos! I wish that the person asking...

Well put Arevos!

I wish that the person asking these questions would follow forum etiquette and start their own thread with the proper title. Hijacking someone elses thread burries these good...
Forum: Python Jan 5th, 2007, 12:10 PM
Replies: 11
Views: 648
Posted By Dietrich
Go to the book store and get a book on Python and...

Go to the book store and get a book on Python and a book on C++. Both books should have the word "Beginner" in the title. Read a couple of chapters in each book and see which language you can...
Forum: Python Jan 1st, 2007, 2:32 PM
Replies: 15
Views: 526
Posted By Dietrich
I used it while ago, very nice, lots of great...

I used it while ago, very nice, lots of great features, but it chokes on Python files with the .pyw extension. Couldn't figure out how to fix this.
Forum: Python Dec 30th, 2006, 2:00 PM
Replies: 15
Views: 526
Posted By Dietrich
Well, an IDE to me is a step up from a text...

Well, an IDE to me is a step up from a text editor, as you can at least test run your code right from the editor.

Some IDEs get pretty fancy, like the Boa Constructor, where you can drag and drop...
Forum: Python Dec 29th, 2006, 2:34 PM
Replies: 15
Views: 526
Posted By Dietrich
Perfect Python IDE

Well, I think there is most likely not a perfect IDE for everyone. Sort of like the beauty of a girl, car or city. Anyway, what editor or IDE are you using, and what are your reasons you prefer...
Forum: C Dec 28th, 2006, 1:30 PM
Replies: 19
Views: 497
Posted By Dietrich
I am not discharging excrement on this thread,...

I am not discharging excrement on this thread, but have taken a close look at:
http://codeguide.googlepages.com/home

It is almost spam, pushing the résumé of someone that can't spell.
Forum: Python Dec 28th, 2006, 12:25 PM
Replies: 5
Views: 173
Posted By Dietrich
Import a Module

I usually import all the needed modules in the beginning of my program. I keep seeing code that imports modules within a function, wouldn't that be bad? I assume that the module will be imported...
Forum: C Dec 27th, 2006, 10:25 AM
Replies: 19
Views: 497
Posted By Dietrich
Good intentions, but tarnished by bad spelling!

Good intentions, but tarnished by bad spelling!
Forum: Python Dec 10th, 2006, 4:47 PM
Replies: 11
Views: 331
Posted By Dietrich
Thanks Arevos, could one state this: immutable...

Thanks Arevos,

could one state this:

immutable parameters (like numbers, tuples and strings) and mutable
parameters (like lists, dictionaries) are all passed by reference

immutable objects cannot...
Forum: Python Dec 8th, 2006, 1:27 AM
Replies: 11
Views: 331
Posted By Dietrich
In other words, the variable 'a' in the function...

In other words, the variable 'a' in the function stays local to the function, as long as variable 'a' is immutable like a number, string or tuple. Immutable parameters are passed by value.
Forum: Python Dec 2nd, 2006, 11:24 AM
Replies: 1
Views: 182
Posted By Dietrich
Smile Thanks Arevos, it works nicely!

Thanks Arevos, it works nicely!
Showing results 1 to 40 of 437

 
Forum Jump



DaniWeb IT Discussion Community
All times are GMT -5. The time now is 3:37 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC