Search Results

Showing results 1 to 40 of 1000
Search took 0.09 seconds.
Search: Posts Made By: scru
Forum: Python 6 Days Ago
Replies: 3
Views: 285
Posted By scru
Here here!

That said, I would suggest you use if x in dict.keys() rather than if dict.has_key() since the latter is deprecated in later versions of python (it's never too early to start preparing...
Forum: Geeks' Lounge 6 Days Ago
Replies: 25
Views: 900
Posted By scru
It's important to note that this language doesn't seem to be designed for a Python programmer craving more speed. Rather it seems geared at C++ programmers who feel they could benefit from some...
Forum: Python 6 Days Ago
Replies: 2
Views: 188
Posted By scru
Great tutorial, I have some comments.

In python re, you can omit the ^ and $ from your regular expression and use re.match to match the string from start to finish against the expression, as long...
Forum: Python 6 Days Ago
Replies: 3
Views: 148
Posted By scru
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?
Forum: Troubleshooting Dead Machines 6 Days Ago
Replies: 1
Views: 199
Posted By 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...
Forum: Geeks' Lounge 13 Days Ago
Replies: 20
Views: 1,114
Posted By scru
Guess I know whom you voted for.
Forum: Geeks' Lounge 13 Days Ago
Replies: 13
Views: 940
Posted By scru
This isn't really a problem, but if it were, it would be quite a nice one to have.
Forum: Python 25 Days Ago
Replies: 2
Views: 169
Posted By scru
Ooh. didn't notice you were already using the book that I recommended (Incidentally the one I learned Python with). Have you tried the official Python tutorial?
...
Forum: Python 26 Days Ago
Replies: 12
Views: 403
Posted By scru
Whoa hey I did not even notice that! Yeah dude, to make methods in python Classes, set self as the first argument of every routine. To call a method from any method within the same class, do...
Forum: Python 27 Days Ago
Replies: 12
Views: 403
Posted By scru
Well, it's bad 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...
Forum: Python 28 Days Ago
Replies: 12
Views: 333
Posted By scru
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...
Forum: Python 33 Days Ago
Replies: 7
Views: 277
Posted By scru
Convert them all to lower case before using ord: l = l.lower()
Forum: Python 34 Days Ago
Replies: 6
Views: 279
Posted By scru
Not really sure what exactly you're trying to do...
Forum: Python Oct 11th, 2009
Replies: 7
Views: 288
Posted By scru
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] = " "


discalimer:...
Forum: Python Oct 8th, 2009
Replies: 4
Views: 350
Posted By scru
If you a using a GUI/event-driven framework, then yes, it's possible. If you are using console python, then no.
Forum: Geeks' Lounge Oct 8th, 2009
Replies: 179
Views: 9,070
Posted By scru
I say just ignore the thing until it crawls back under the bridge. It cannot be reasoned with.
Forum: Geeks' Lounge Oct 7th, 2009
Replies: 179
Views: 9,070
Posted By scru
(emphasis mine)
I actually just read this. It might as well have been:


I'm pretty sure GM wasn't raking in billions (yes, that's a b) in profits 6 years ago.

But you'd love MS to fail...
Forum: Geeks' Lounge Oct 7th, 2009
Replies: 179
Views: 9,070
Posted By scru
Where to start, where to start...

You simply aren't going to fool anyone by claiming "most techies use Linux". Your own poll proves you wrong. Perhaps "most people who enjoy tinkering around in...
Forum: Geeks' Lounge Oct 7th, 2009
Replies: 179
Views: 9,070
Posted By scru
Okay, I didn't read much of what was said (I tend not to pay much attention to fanboys). But anybody who says things like "Anyone who has a good understanding of operating systems in addition to...
Forum: Geeks' Lounge Oct 6th, 2009
Replies: 179
Views: 9,070
Posted By scru
I can tell already that you won't have much luck with Linux.
Forum: Python Oct 6th, 2009
Replies: 3
Views: 221
Posted By scru
Huh? You've said what you've done, but not what you're trying to do...
Forum: Python Sep 26th, 2009
Replies: 4
Views: 379
Posted By scru
Thanks for the suggestion. I've been able to use wisent for what I want.
Forum: Python Sep 22nd, 2009
Replies: 4
Views: 326
Posted By scru
http://tronche.com/gui/x/xlib-tutorial/
Forum: Python Sep 22nd, 2009
Replies: 7
Views: 527
Posted By scru
Forum: Python Sep 22nd, 2009
Replies: 4
Views: 326
Posted By scru
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...
Forum: Python Sep 21st, 2009
Replies: 4
Views: 379
Posted By scru
I could use the intepreter to evaluate, but that's not what I want. I want to parse the expressions into data structures that I can easily inspect in code.

So... this question is still open.
Forum: Python Sep 21st, 2009
Replies: 4
Views: 379
Posted By 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...
Forum: Python Sep 20th, 2009
Replies: 13
Views: 602
Posted By scru
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.
Forum: Python Sep 20th, 2009
Replies: 5
Views: 822
Posted By scru
Where is the cTurtle website? Do they have a .tar.gz source distribution? If they do try downloading, untarring and running python setup.py install. Also, make sure that you are running the correct...
Forum: Python Sep 12th, 2009
Replies: 6
Views: 324
Posted By scru
bytes, as they exist in Python 3.1 are conceptually new to Python (starting with version 3). This isn't to say that 8-bit strings didn't exist before in the form of regular text strings. Note the...
Forum: Python Sep 12th, 2009
Replies: 6
Views: 324
Posted By scru
I happen to think this behavior is consistent (with indexing and slicing rules).

Here's why it makes sense:

bytes and str are not the same. They aren't even conceptually the same.

A bytes...
Forum: Python Sep 11th, 2009
Replies: 5
Views: 729
Posted By scru
You actually think that is more exotic? Wow.
Forum: Python Sep 11th, 2009
Replies: 6
Views: 324
Posted By scru
No. b'\x01\x02' Is a byte string in python. The expression bs[x] means that you want the byte at position x in the bytestring x, while bs[a:b] means that you want the part of the byte string from a...
Forum: Python Sep 6th, 2009
Replies: 3
Views: 616
Posted By scru
Just a few of my no-gos/failed projects:

1. Implement an open hashing or encryption algorithm
2. Write an IM program that encrypts the messages that it sends. (HINT: each user has a public...
Forum: Python Sep 6th, 2009
Replies: 12
Views: 596
Posted By scru
Sigh.

No, python doesn't have clear screen.
Forum: Python Sep 6th, 2009
Replies: 15
Views: 525
Posted By scru
(emphasis mine)

No, they won't. You see, there's no good reason anybody would want to do that. I guarantee you that anybody wanting to do this has a totally different underlying problem to which...
Forum: Python Sep 6th, 2009
Replies: 12
Views: 596
Posted By scru
Python.org supposedly loves spam anyway, so long as you include some eggs.
Forum: Python Sep 6th, 2009
Replies: 4
Views: 268
Posted By scru
Look, not to be harsh or anything, but given you previous posts I think you would be better off reading a book or a wiki or even just a tutorial on Python OOP and maybe Python in general. Really.
Forum: DaniWeb Community Feedback Sep 6th, 2009
Replies: 74
Views: 4,493
Posted By scru
Huh. Now I can see profiles again.
Forum: Geeks' Lounge Sep 6th, 2009
Replies: 46
Views: 3,131
Posted By scru
Definition of "own" (http://www.google.com.vc/search?q=define%3A+own&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a)
Defintion of "use"...
Showing results 1 to 40 of 1000

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC