I'm thinking about teaching myself Python, anyone else done it?

My first experience with programming was back in the late 80’s with basic when I was in middle school. I liked it, and it made sense to me. Now, I’m looking to expand my repertoire of computer knowledge, and from what I’ve read online, Python is a good one to start with.

People have said that it is widely used, fairly intuitive, doesn’t have too steep a learning curve, all of which I am in big favor of.

So, is this something worth getting into? If so, what tools, downloads, and sites do you recommend? Any and all feedback is welcome. I’ve heard good things about Ruby and Perl too, but those might not be for me. I don’t know, that’s why I’m asking.

Thanks.

Python is a fine language to get re-started on. I would certainly suggest it among the collection of Perl, Ruby, and Python. What languages and tasks did you do back in the '80’s? What computers did you use? Were you using BASIC or something else?

Here are a few free online books:
Invent Your Own Computer Games with Python: This is a beginner’s guide to Python built around game programming.

Beginner’s Guide to Python: The official beginner’s guide from Our Documentation | Python.org.

Dive Into Python: This one is intended for more experienced programmers.

There are two active flavors of Python syntax: 2.x and 3.x. Code is not compatible across both flavors. If you are working from a book, then use the version that the book suggests (probably 2.x). You can learn to switch from 2.x to 3.x fairly easily later on.

Regarding tools: You need the Python installation package and a text editor. You don’t need an IDE or any other tools.

Start with very simple program ideas until you get the hang of the built-in data types (tuples, sequences, dictionaries). Simple ideas will be satisfying enough to accomplish without being frustrating or discouraging.

Looks like I forgot to capitalize BASIC in my OP. I did really simple stuff on Apple IIe’s mostly. I did some rudimentary graphics, and a super simple game or two.

Once I get a handle on the nuts and bolts of it I’ll probably have a better idea about whether or not this is a worthwhile endeavor.

Thanks for the links!

Lots of people do it, and then annoy their friends by quoting it incessantly in a bad English accent. :stuck_out_tongue:

My fault, I just missed it (on re-read too).

Forgot to mention: If you want to learn programming for programming’s sake, I think Python is a great choice. If you want to learn programming to solve certain types of tasks or create certain types of programs, then there might be a particular language that would be better suited.

I got the impression from your OP that you want to re-learn programing in general.

Oops!:wink:

And here I was, already preparing my lectures! :frowning:

Thanks

Q

I highly recommend the books Learning Python for a very in-depth tutorial, and Programming Python as a comprehensive reference which also has some information about more advanced topics.

Well I dove right in, and I’m liking it. I read through most of the first two links, and have written a few really simple programs

My BASIC background (limited as it was) has been helpful, but I think just about anyone with the right mindset could pick up the basics and pick up a new skill.

Thanks for the links guys!

Glad you are having fun! It is a great language and it can be very liberating after working on C or C++ all day.

Feel free to post or PM if you get stuck or have any questions.

By learning “Python”, do you mean the full Monty [Python]? :wink:

That is actually where the name came from, Monty Python that is. They encourage the use of MP terminology whenever possible. A lot of the practice examples use “spam” as a variable. Programming in the nude is strictly optional though. :smiley:

I’ll do that. Thanks!

So Python programs don’t have arguments, just a series of mutually contradictory statements?

I like Python, and used IronPython to redevelop a simple VB application. However, while Python structure makes the code far more readable, python programmers still use shortcuts that can be confusing. In particular, tuple style assignments of the


a,b,c = 1,1,a+b

annoy me greatly.

Si

There are development environments called IDLE (for Integrated DeveLopment Environment) and ERIC. ERIC includes a tool called Bicycle Repair Man.

I did learn it over the Christmas holidays. The best sites and books have already been pointed out, so I’ll just give you a couple of tips. The standard library for graphic user interfaces in Python, Tkinter, is a tad clunky and old fashioned, and not satisfactorily documented. Have a look at it, to get the basics, but skip it if you plan to do anything other than very simple interfaces. In its place, use wxPython. I’d also say not to rely too much on older books, because the language has been evolving, and some significant features were introduced after some of the available books have been published.

Nooooobody expected you to teach yourself Python!

While we’re discussing programming, has anyone here ever done a simulated annealing algorithm? I’m working on a project where that seems like it might work, but I’m having trouble finding clear information about how to implement it.

I haven’t, but I found this package: Parallel Simulated Annealing in Python. I wasn’t sure from your post if you know about this package and are trying to use it – or if you are looking for a package like this.

I’m teaching myself Python. I’m currently using the suggested readings from MIT’s beginning programming class (which uses Python) from MIT’s Opencourseware.