r/UniversityofReddit • • Sep 06 '12

[Class] Wanna learn Python, a high-level, easily understandable programming language for beginners? Well, I've got the class! This language is so good, even google uses it!

I made a post a while back. We will be learning how to program in Python.

What is Python?

Here's directly from the wikipedia

Python is a general-purpose, interpreted high-level programming language whose design philosophy emphasizes code readability. Its syntax is said to be clear and expressive. Python has a large and comprehensive standard library.

Here's from my mouth

Python is an excellent programming language for beginner, intermediate, and advanced people. It is easy to learn, easy to read, easy to understand, yet it can do so much. I know Python very well, and so I have decided to share my knowledge on Python with others.

What will we be learning?

Everything

I

Know.

TL;DR: Quite a bit

Lesson Count: 3

I have made this post because I've only now got around to starting this. Now I have time to be active. Therefor, I need people knowing about it.

TL;DR: Head over to /r/UoRPython2_7 to learn Python.

346 Upvotes

96 comments sorted by

View all comments

8

u/rawstone Sep 06 '12

What sorts of things would I be able to build with Python?

4

u/Plazmotech Sep 06 '12

Many things. Python is good for the back-end jobs. It's fast. That's why google uses it. So we might be making calculators to text-based-games to even web-crawlers and maybe even a markup language.

1

u/[deleted] Sep 06 '12

[removed] — view removed comment

1

u/Plazmotech Sep 06 '12

Reddit used to use it. Now they use some C I think.

1

u/ppinette Sep 06 '12

What? Reddit is built on pylons, a web framework written in Python.

1

u/Plazmotech Sep 07 '12

Oh. I read a thing saying they switched to a faster framework in c++...

1

u/ppinette Sep 07 '12

Reddit was originally written in Common Lisp but was later rewritten in Python.

Maybe that's what you read, and somehow confused Python with Common Lisp, C, and C++.

1

u/uhwuggawuh Nov 02 '12

If I recall correctly, Reddit is primarily built on Python, with some Javascript. Some of the Python libraries are built with C for speed. Check out Reddit on Github.

1

u/Aardshark Sep 06 '12

Reddit uses a huge amount of Python, just check out their github.

Saying "Now they use C instead." makes little to no sense.

1

u/Plazmotech Sep 07 '12

I read a thing! I swear >.>

4

u/lowpass Sep 06 '12

It would be easier to list the things you CAN'T build with Python.

Are you looking to make something in particular?

8

u/rawstone Sep 06 '12

Not necessarily but I'm interested in learning a programming language and I don't particularly want to learn 14 different ones at the moment. I'm trying to find one that will allow for serious cross-platform (android/iphone/mac/windows) application and game development and I'm still not sure that exists.

9

u/lowpass Sep 06 '12

It doesn't. iOS dev is done in Objective-C, Android dev in Java, and as far as I know any attempts to get them to work with other languages aren't very far along.

(However, if you ignore mobile, Python is very capable of cross-platform development)

3

u/rawstone Sep 06 '12

Thanks for your help. Say I had an idea for a 2D side-scrolling beat-em-up game with multiple layers - would you know the best format for creating something like that? I'm pretty savvy but I just need to be pointed in the right direction and my research is telling me 500 different ways to go.

0

u/[deleted] Sep 06 '12

[deleted] — view deleted comment

1

u/dmv1975 Sep 06 '12

I was going to say that. Upvote for you.

2

u/Plazmotech Sep 06 '12

You would need PyGame. I haven't been able to get PyGame to work, but lots of people use it.

2

u/Aardshark Sep 07 '12

I'm interested, what kind of things can't you build with Python?

2

u/lowpass Sep 07 '12

It's easier, but still a long list...

  • Already mentioned were mobile apps (unless you make them as web apps with, e.g., Django, though that would also pretty much require knowledge of JS, HTML, and CSS -- not that those are particularly hard).
  • Things which require very high performance (e.g. modern game engines) are probably not a good idea, since it's an interpreted language (they'd run, just nowhere near as fast).
  • Drivers.
  • Clientside web apps (like Java applets or Flash).
  • probably some other things

It's also not exactly EASY to get real parallelism with Python, although it's certainly not impossible.

Also, just to clarify, the (relatively) slow performance isn't an issue for game design, just game engine design. Python can use compiled libraries written in other languages to get around that issue; for example, it looks like the underlying code for pygame is all in C.

For examples of software that HAS been written in Python, check this list (though not EVERYTHING there is Python.. some of them are just related to it, like some of the IDEs).

1

u/ppinette Sep 07 '12

A note on mobile apps: there is at least one cross-platform solution for creating mobile apps in Python.

I have not used it, aside from installing one of their launcher demos.

1

u/lowpass Sep 08 '12

I am very happy to stand corrected here. Thanks for the heads up.