Programming Forums
User Name Password Register
 

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

Showing results 1 to 40 of 346
Search took 0.03 seconds.
Search: Posts Made By: lrh9
Forum: Community Introductions Mar 7th, 2010, 4:18 PM
Replies: 21
Views: 893
Posted By lrh9
Re: Which language would you say to start?

I'd personally recommend Python to start with, but as others said if you are going to be a professional it is best to learn multiple languages.

Of course a suggestion that everyone dismisses out of...
Forum: Community Introductions Feb 22nd, 2010, 10:50 PM
Replies: 9
Views: 265
Posted By lrh9
Re: Where did you get your start at programming?

I got started in High School grade 10 -- VB6 =).

Hey! Me too!

I've yet to make anything of practical value.

I am working on an agent-oriented framework in Python which I hope to utilize for...
Forum: Python Feb 16th, 2010, 9:40 AM
Replies: 2
Views: 137
Posted By lrh9
Re: Custom Parser

The modules "cmd" and "code" contain code to create a line oriented command parser and a Python interpreter emulator respectively.

Looking at them might help you generate code and ideas for your...
Forum: Python Feb 5th, 2010, 6:18 PM
Replies: 5
Views: 175
Posted By lrh9
Re: Trying to reverse a string.

I did a timeit on the code, and a repeat timer of three timeits at one million executions of the main statement each timeit yields results like this one.



A longer string - ten or twelve times...
Forum: Python Feb 5th, 2010, 5:55 PM
Replies: 4
Views: 116
Posted By lrh9
Re: beginner teething problems!

If you ever have trouble with an object again, you can use Python's built-in "help" function to obtain details and usage details about the object.

print(help(print))
Forum: Python Feb 5th, 2010, 5:40 PM
Replies: 5
Views: 175
Posted By lrh9
Re: Trying to reverse a string.

An interesting problem. I'm surprised that the string object doesn't have a method to return its reverse string sequence.

There are many ways to obtain the reverse string sequence of a string, but...
Forum: Python Feb 5th, 2010, 5:18 PM
Replies: 4
Views: 116
Posted By lrh9
Re: beginner teething problems!

In Python 3 print becomes a function.

print(1+1)
Forum: Python Feb 4th, 2010, 1:11 PM
Replies: 9
Views: 171
Posted By lrh9
Re: name 'self' not defined

All code in the class scope is executed when the class is declared.

class MyClass:

print("Now executing code in MyClass.")



If you want an object to have an attribute that is modified by...
Forum: Coder's Corner Lounge Feb 4th, 2010, 2:23 AM
Replies: 20
Views: 702
Posted By lrh9
Re: Help with first language

The Unix profile in your home directory.

Maybe this link will help.

http://www.uic.edu/depts/accc/software/unixgeneral/unixcust.html
Forum: Coder's Corner Lounge Feb 3rd, 2010, 7:42 PM
Replies: 20
Views: 702
Posted By lrh9
Re: Help with first language

I'm not a Unix user, so please bear with me. As I understand it, in order for the settings you use to be persistent you have to alter your ".profile", but I don't know what that is.
Forum: Coder's Corner Lounge Feb 2nd, 2010, 5:15 AM
Replies: 20
Views: 702
Posted By lrh9
Re: Help with first language

Right. If you make the first line of your script a shebang you can run it that way.

#!/usr/bin/env python
Forum: Coder's Corner Lounge Feb 2nd, 2010, 2:05 AM
Replies: 20
Views: 702
Posted By lrh9
Re: Help with first language

Doesn't matter. Not really. There are still plenty of programs out there that require the older line version 2 of Python, because Python 3 is this decade's backwards incompatible release.

Meaning...
Forum: Coder's Corner Lounge Jan 31st, 2010, 2:15 AM
Replies: 20
Views: 702
Posted By lrh9
Re: Help with first language

daniweb has two threads stickied in the Python section of their forum for beginners.

Starting Python

http://www.daniweb.com/forums/thread20774.html

Projects for the...
Forum: Python Jan 30th, 2010, 10:49 PM
Replies: 2
Views: 220
Posted By lrh9
Re: Making Python Output a Key Press

I don't think it would be easy. To the best of my knowledge it would require you to use system specific code.
Forum: Coder's Corner Lounge Jan 30th, 2010, 8:57 PM
Replies: 20
Views: 702
Posted By lrh9
Re: Help with first language

Python.

Python source code is generally short.

Python avoids punctuation based syntax, making it easy to read.

Python is easy to learn. For instance, in the interpreter all you would need to do to...
Forum: Python Jan 21st, 2010, 3:23 PM
Replies: 3
Views: 156
Posted By lrh9
Re: Make new file

A more classy way to do that is to use http://lmgtfy.com/

http://lmgtfy.com/?q=python+create+file
Forum: Python Jan 20th, 2010, 4:09 PM
Replies: 5
Views: 185
Posted By lrh9
Re: Problems with the interpreter's exit() function.

I would have liked the intuitive command for exiting an interpreter to be the command for exiting this interpreter emulator.
Forum: Python Jan 19th, 2010, 12:54 PM
Replies: 5
Views: 185
Posted By lrh9
Re: Problems with the interpreter's exit() function.

Neither. The code module's interpreter is merely an emulator of the Python interpreter. In simple terms, it starts an input loop that executes input as code - in the fashion of the Python...
Forum: Python Jan 18th, 2010, 1:20 PM
Replies: 5
Views: 185
Posted By lrh9
Re: Problems with the interpreter's exit() function.

I was able to answer my last question.

In order to access all of the attributes of the object simply pass locals() as the local, and then refer to the object as "self".
Forum: Python Jan 18th, 2010, 12:57 PM
Replies: 5
Views: 185
Posted By lrh9
Problems with the interpreter's exit() function.

I'm using the code module to add an interactive interpreter to an object. This object has an interact method that when called creates an interactive interpreter with the object's dictionary as the...
Forum: C++ Jan 16th, 2010, 2:31 PM
Replies: 17
Views: 586
Posted By lrh9
Re: Learning C++ then Python...

Original poster, if you're in mechanical engineering you'll probably be using C++ more often, but it can't hurt to know both. In fact if you are clever you might come up with some useful ways to use...
Forum: C++ Jan 16th, 2010, 1:51 PM
Replies: 17
Views: 586
Posted By lrh9
Re: Learning C++ then Python...

No. I mean all people. I've never heard of anyone willing to pay for someone to produce a data structure. Rather everyone I've seen either wants an algorithm or program. Do you want to keep arguing?
Forum: C++ Jan 16th, 2010, 1:23 PM
Replies: 17
Views: 586
Posted By lrh9
Re: Learning C++ then Python...

People will always prefer a fully functional program over a data structure, so good luck with your opinion. You'll need it.
Forum: C++ Jan 16th, 2010, 12:27 PM
Replies: 17
Views: 586
Posted By lrh9
Re: Learning C++ then Python...

In my personal opinion, I honestly cannot see any compelling reason to learn C++ before Python. C++ is certainly more widespread, and even has technical benefits over Python, but Python's ease of use...
Forum: Coder's Corner Lounge Jan 13th, 2010, 7:29 AM
Replies: 2
Views: 212
Posted By lrh9
Re: Python-Vs-Perl-Vs-Ruby, a personal opinion

The only fair recommendation would come from someone who had used all of them so they could be compared and contrasted.

I personally have only tried Python, but I've had positive experiences with it...
Forum: Python Jan 7th, 2010, 3:32 AM
Replies: 3
Views: 139
Posted By lrh9
Re: I've been trying to utilize Python import hooks.

That is in fact the case.

To fix this behavior, it would simply be a matter of looping through the built-in modules if that dictionary exists and reloading them.

Now I need to determine how to...
Forum: Python Jan 7th, 2010, 3:26 AM
Replies: 3
Views: 139
Posted By lrh9
Re: I've been trying to utilize Python import hooks.

My first guess about what happened would be that the IDLE imports random when it starts. It probably has the random module all ready cached. If a module is cached, importing it will merely result in...
Forum: Python Jan 7th, 2010, 3:20 AM
Replies: 3
Views: 139
Posted By lrh9
Re: I've been trying to utilize Python import hooks.

Actually, please feel free to contribute help, but I managed to create a working example of an import hook.



class Restricted:

def __init__(self):
print("Initializing...")
...
Forum: Python Jan 7th, 2010, 2:56 AM
Replies: 3
Views: 139
Posted By lrh9
I've been trying to utilize Python import hooks.

And I can't get anything I write to work.

I'm so far off course I think I just need a working example of import hooks in action.

I've looked for examples on the Internet, but they only show what...
Forum: Python Jan 2nd, 2010, 12:52 AM
Replies: 5
Views: 7,666
Posted By lrh9
Re: Does this qualify as a shredding algorithm?

One way to overcome the immutability of strings is to append each character (byte) you generate to a list. When it comes time to write the file, you could use

overwrite = "".join(L)

where L is the...
Forum: Python Jan 1st, 2010, 11:22 PM
Replies: 3
Views: 254
Posted By lrh9
Re: Resources on building custom importer.

I've read up on PEP 302 some more, and I've looked over importlib and the abstract base classes some more.

I think I'm understanding it better.

Basically, I need an object known as a finder first....
Forum: Coder's Corner Lounge Jan 1st, 2010, 12:47 AM
Replies: 6
Views: 234
Posted By lrh9
Re: Wishing everyone the best in 2010

Happy New Year! I have no resolutions, but I'm trying.
Forum: Python Dec 31st, 2009, 11:09 PM
Replies: 7
Views: 486
Posted By lrh9
Re: Virtual Pet

I mean in the program itself. You did a fairly good job with the critter class.
Forum: Python Dec 31st, 2009, 11:06 PM
Replies: 4
Views: 256
Posted By lrh9
Re: masking console input with a character

In that case if your Python installation has tty.py in the library you might be able to accomplish something with that. I don't know anything about terminals.

termios might be another module to look...
Forum: Python Dec 31st, 2009, 10:59 PM
Replies: 3
Views: 360
Posted By lrh9
Re: ISO: Some Feedback. [Beginner Programmer]

I guess we're just going to have to disagree about that then.
Forum: Python Dec 31st, 2009, 12:13 AM
Replies: 7
Views: 486
Posted By lrh9
Re: Virtual Pet

Object oriented design and code is a good idea.
Forum: Python Dec 31st, 2009, 12:10 AM
Replies: 4
Views: 492
Posted By lrh9
Re: parsing a text file with python and changing lines

I think we really need to be more familiar with the ICS file format to help.
Forum: Python Dec 31st, 2009, 12:04 AM
Replies: 3
Views: 360
Posted By lrh9
Re: ISO: Some Feedback. [Beginner Programmer]

I think the best advice is to scrap the system and rebuild it using object oriented code.
Forum: Python Dec 30th, 2009, 9:49 PM
Replies: 4
Views: 256
Posted By lrh9
Re: masking console input with a character

I can confirm getpass echoes on Windows.

The only option I can think of is upgrading to a graphical user interface. I think tkinter widgets feature character masking.
Forum: Community Introductions Dec 29th, 2009, 1:06 AM
Replies: 1
Views: 406
Posted By lrh9
Re: Never programmed

The way I started learning was I simply selected a language that seemed interesting, downloaded the language software, searched for a "Hello, world!" example, completed it, tinkered a bit, and then...
Showing results 1 to 40 of 346

 
Forum Jump



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

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