Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Learning Python

Status
Not open for further replies.

Coderifous

Programmer
Dec 13, 2001
782
US
Well, the time has come to set down my most beloved weapon and learn how to use a new one. I'm going to begin learning python, as I have heard some good things about it. It's way different from Perl - from what I see so far. I hope the transition will be smooth though.

Anyone here program Python? I'd appreciate a book suggestion or two.

--jim
 
Python?

Ok..... It won't be as nice as Perl though.... Mike
______________________________________________________________________
"Experience is the comb that Nature gives us after we are bald."

Is that a haiku?
I never could get the hang
of writing those things.
 
Damnit Mike. That's not the support I'm looking for. ;|
Have experience w/ it?
--jim
 
HERETIC!

Just kidding. I may soon be on a project that uses Python. Please report back with your impressions and observations.
 
:) Some yeah - looks ok actually, but you're not allowed to tell anyone I said so. Mike
______________________________________________________________________
"Experience is the comb that Nature gives us after we are bald."

Is that a haiku?
I never could get the hang
of writing those things.
 
Doh! Did I type that out loud? Mike
______________________________________________________________________
"Experience is the comb that Nature gives us after we are bald."

Is that a haiku?
I never could get the hang
of writing those things.
 
Nope. I doubt anyone in your house could hear what you typed. :)
 
OK. I've learned a little more about Python, seen a bit more syntax, and would rather stick my self in the eye than produce Python code. Well, that's a bit dramatic but I'm definitely not excited about learning Python. I was at Border's reviewing some of the books - not a pretty site.

However, a while ago I read an article about a newer language called Ruby (born in 1995) and was a bit intrigued w/ it. Found a book at Borders that presented it pretty good (apparently it's easy for a perl programmer to make the transition to Ruby - Ruby took ALOT from Perl (which in turn took a lot from other languages) and if you understand OO concepts, even better)

Ruby is an OO langauge where everything is an object (and I mean everthing, even regular variables)

So now I turn the question into "Anybody have any input on Ruby?".

--jim
 
No input on Ruby, but I looked up Python a bit. After only a few minutes, I share your opinion on it. Look at this example from python.org:

Code:
while candidates:
        while product < 1000:
            if product in candidates:
                candidates.remove(product)
            product = product+base
        result.append(base)
        base = candidates[0]
        product = base
        del candidates[0]

    result.append(base)
    print result

It uses TABS to define the beginning/end of a block!
 
Yea, at first glance, that was the very first think I hated about it.

YUCK! For multi-nested loops and conditions you can code that runs off the right side of the page several times. THAT SUCKS!

Check out Ruby though. It looks really cool. One big downside: not alot of documentation. I only found (physically there) 2 books on Ruby at borders. There were over 30 Perl books there. That's a big difference.

&quot;Programming Ruby&quot; and &quot;The Ruby Way&quot; were available. I read a little from each and will probably pick up &quot;The Ruby Way&quot;... It seems to provide more comparisons to Perl.

--jim
 
Learn C++ and write your own language. :) But yes, its too hard. There is no Knowledge that is not power.
Age: 16
E-mail: projectnet01@yahoo.com
Company:(not done yet) :)
Status: Currently working with C++ for game developing. And making a musical band.
-Aaron
 
Hehe, that would be cool. We should all brainstorm ideas of what the perfect programming language would be. :D
 
Yeah I figure that perl is the only scripting language I will need... well besides bash shell scripting. I had to learn VB for my previous job and that wasn't much of a good time.. as a language I think it is bad. I've moved on to C and C++ (which I love) for my current job and I'm having to learn x86 Assembler. That's a real challenge. I was always curious about Ruby myself... I have heard some good things about it. I looked at python a little and thought much the same as you guys. Once you get the Ruby book and look over it a bit you should let us know what it's like. I personally think its good to know multiple languages.
 
Yes, I've heard good things about Ruby. It will be interesting to hear what you think of it. Mike
______________________________________________________________________
&quot;Experience is the comb that Nature gives us after we are bald.&quot;

Is that a haiku?
I never could get the hang
of writing those things.
 
> It uses TABS to define the beginning/end of a block!

As little as a single space will work. Running this Python code:
[tt]
for x in [2,3,5,7,11]:
print x,
print ";",
print "\nHi, Mom!"
[/tt]
produces
[tt]
2 ; 3 ; 5 ; 7 ; 11 ;
Hi, Mom!
[/tt]
 
I always thought the indenting in Python was kind of weird.. I always indent with perl anyway, so I guess it wouldn't be hard to get used to.
I've been thinking about learning Ruby also.. there's a forum here on tek-tips, but it's not very active, and no FAQ's yet.. maybe someone from here will write the first one??

There's an IRC channel on freenode for Ruby - #ruby-lang I think. Quite a few users there last time I checked.
 
The great portupgrade in FreeBSD is written in Ruby, so I have it installed, but I've never touched it. In my head, it's similar to python, but I really haven't used either and I have no basis for such. I did try and hack away at the python that is freevo, but that wasn't written very portably, so that pet project died hard.

I don't know, these days I tend to be buried in VB.NET, which is a mite different from the Perl of old. Sometime I promise I'll hit up the old syntax highlighting module again and, you know, make a contribution. Well, a sizable code contribution.

I suppose I should just let the ancient thread die, no?

________________________________________
Andrew

I work for a gift card company!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top