Programming Forums
User Name Password Register
 

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

Reply
 
Thread Tools Display Modes
Old Dec 13th, 2005, 7:57 PM   #1
Indigno
Professional Programmer
 
Indigno's Avatar
 
Join Date: Dec 2005
Location: Anywhere non-productive
Posts: 267
Rep Power: 0 Indigno is an unknown quantity at this point
Send a message via AIM to Indigno Send a message via MSN to Indigno Send a message via Yahoo to Indigno
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?
Indigno is offline   Reply With Quote
Old Dec 13th, 2005, 8:54 PM   #2
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
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
DaWei is offline   Reply With Quote
Old Dec 14th, 2005, 1:46 AM   #3
Dietrich
Professional Programmer
 
Dietrich's Avatar
 
Join Date: Feb 2005
Posts: 434
Rep Power: 4 Dietrich is on a distinguished road
Smile

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!
Dietrich is offline   Reply With Quote
Old Dec 14th, 2005, 2:14 AM   #4
Arevos
Programming Guru
 
Arevos's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5 Arevos is on a distinguished road
Quote:
Originally Posted by Indigno
And to be perfectly honest, I don't even know what it's best suited for.
Generally speaking, Python is good at reducing the time it takes you to program a piece of software (sometimes by a significant degree of magnitude), at the expense of being less efficient than a compiled language such as C at runtime.

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
Arevos is offline   Reply With Quote
Old Dec 14th, 2005, 2:17 AM   #5
coldDeath
Expert Programmer
 
coldDeath's Avatar
 
Join Date: Aug 2005
Location: UK
Posts: 862
Rep Power: 4 coldDeath is on a distinguished road
Send a message via AIM to coldDeath Send a message via Yahoo to coldDeath
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.
coldDeath is offline   Reply With Quote
Old Dec 14th, 2005, 8:31 AM   #6
MegaArcon
Programmer
 
MegaArcon's Avatar
 
Join Date: Aug 2005
Posts: 66
Rep Power: 0 MegaArcon is an unknown quantity at this point
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. ^_^
MegaArcon is offline   Reply With Quote
Old Dec 14th, 2005, 12:31 PM   #7
Cerulean
Professional Programmer
 
Cerulean's Avatar
 
Join Date: Apr 2005
Location: London, England
Posts: 459
Rep Power: 4 Cerulean is on a distinguished road
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'.
Cerulean is offline   Reply With Quote
Old Dec 14th, 2005, 12:55 PM   #8
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
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
DaWei is offline   Reply With Quote
Old Dec 14th, 2005, 1:10 PM   #9
coldDeath
Expert Programmer
 
coldDeath's Avatar
 
Join Date: Aug 2005
Location: UK
Posts: 862
Rep Power: 4 coldDeath is on a distinguished road
Send a message via AIM to coldDeath Send a message via Yahoo to coldDeath
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.
coldDeath is offline   Reply With Quote
Old Dec 14th, 2005, 4:15 PM   #10
Dietrich
Professional Programmer
 
Dietrich's Avatar
 
Join Date: Feb 2005
Posts: 434
Rep Power: 4 Dietrich is on a distinguished road
Smile

Quote:
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 "Arevos".
Dito!!!
__________________
I looked it up on the Intergnats!
Dietrich is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




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

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