![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Professional Programmer
|
What's the big deal about python, anyways?
I hear people at my school who use it telling me how wonderful it is. And to be perfectly honest, I don't even know what it's best suited for. I would like to take a look at it. Are there any free compilers out there that are any good?
|
|
|
|
|
|
#2 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Python is normally interpreted, though there are compilers. Have you Googled for answers?
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#3 |
|
Professional Programmer
Join Date: Feb 2005
Posts: 434
Rep Power: 4
![]() |
Python is compiled to a byte code and then interpreted. No, there are no traditional compilers, but there are packagers that package the byte code with the interpreter (py2exe). Python is open source and available free from www.python.org and other sites.
It's a powerful and modern language that brings the fun back to programming. Don't let the shell programming with the >>> confuse you, use an IDE to program. There are a number of free IDEs available specifically geared to Python.
__________________
I looked it up on the Intergnats! |
|
|
|
|
|
#4 | |
|
Programming Guru
![]() Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5
![]() |
Quote:
Computers are fast enough nowadays to make Python a reasonable choice to develop most types of software. There are websites written in Python, and GUI applications written in Python, such as the original Bittorrent. Python has some very neat network modules, and good 2D support in the form of Pygame. Python can even handle OpenGL successfully; though here you start to get to its limitations. Though it's perfectly possible to adapt a 3D engine coded in C for use with Python - Crystalspace, ORGE3D and even Torque has, I believe, some Python bindings. I'm a Python fan because I like the fast results and neatness I get with programming in a high-level language. If I want to create a program, I can usually do it a lot faster in Python; this is good news for someone as impatient as me ![]() |
|
|
|
|
|
|
#5 |
|
Expert Programmer
|
Yep, Python is great, and its interpretor is good for testing short bits of code, and running long files full of code. Its different to most languages as it is more modern and it has a different approch.
Extract from my python tutorial: + A scripting language (often compared to Perl, Scheme and TCL) + It is interpreted + It is Object Oriented + It is multi-platform and portable (it will run on more than one operating system eg: Windows, *nix, Mac, Amiga etc.) + It has clear easy to read syntax + It has a lot of extra modules to help you perform tasks (for example the PyGame module allows you to create games) + It is very powerful yet useable + It has many GUI (Graphical User Interface) toolkit, such as Tkinter (standard Python GUI toolkit, ugly looking and not very nice to code), PyQt (You have to pay to use Qt on Windows, but this will change in Qt4), PyGTK, WxPython (great multiplatform toolkit) etc. All in all, Python is great and perfect for beginners and experts alike.
__________________
Join us at #programmingforums @ irc.freenode.net! My software never has bugs. It just develops random features.
|
|
|
|
|
|
#6 |
|
Programmer
Join Date: Aug 2005
Posts: 66
Rep Power: 0
![]() |
My learing language was actually Java...and Java was pretty much all I used for quite some time. But for the work I've been doing lately, I've been learning python and I'm finding that the more I use it the more I love it.
Python is beautiful for server-side web scripts. It's quite powerful and it has a LOT of functionality. One of the things that I like about it is that it dosen't use opening and closing braces to incase code blocks ( { } ). Now, it's not that I'm to lazy to put them in (although the time saved IS nice ), python uses indentation to incase it's blocks of code. This FORCES people to write readiable code with a nice structure, becasue if you don't write it with the proper block structure, you don't get the functionality that you need.Python is also not a strongly typed language. So you don't need to specify if its a "int", "string" or whatever. You just stick said thing in a variable and python decides what it is when you call your functions and operations. (of course this dosent mean, as far as I know, that you can treat your variable foo as a string in one block and then consider it a int in another. When you decide that it's going to be a string, it stays a string.) Comming from a Java world, this is a double edged sword. (At least as far as I'm conserned.) Its a beautiful thing to just stick an object into a variable and just run with it. However, its also nice to have a variable declared as String foo; as now foo is a string and you know thats all it can be. Anyhow, that's my 10 cents. In conclusion...Python is a good thing. A very good thing. ^_^ |
|
|
|
|
|
#7 |
|
Professional Programmer
Join Date: Apr 2005
Location: London, England
Posts: 459
Rep Power: 4
![]() |
Again, Python is strongly typed. A variable still has a type, it's just that the interpreter can infer the type of the variable by what you assign (what you put on the right hand side of the '='). You can't change the type of a variable in Python.
The phrase you're looking for is 'dynamically typed'. |
|
|
|
|
|
#8 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
There are benefits and drawbacks to weaker typing. Try 10 + 1 in some languages sometime and see what happens. Ya could be surprised
.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#9 |
|
Expert Programmer
|
One problem is demostrated here:
NumOfMonsters = 33 NumOfCastles = 3 NumOfMonnsters = NumOfMonsters * NumOfCastles print NumOfMonsters #Doesn't show any errors but is hard to debug
__________________
Join us at #programmingforums @ irc.freenode.net! My software never has bugs. It just develops random features.
|
|
|
|
|
|
#10 | |
|
Professional Programmer
Join Date: Feb 2005
Posts: 434
Rep Power: 4
![]() |
Quote:
__________________
I looked it up on the Intergnats! |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|