Why should i learn Python?

Thread Solved

Join Date: Jul 2005
Posts: 29
Reputation: Gargen is an unknown quantity at this point 
Solved Threads: 0
Gargen Gargen is offline Offline
Light Poster

Why should i learn Python?

 
0
  #1
Jul 6th, 2005
im just curious im currently learning all major programming languages that are usefull to me and i am wondering what is python useful for in a realistic sense
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 3,947
Reputation: vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice 
Solved Threads: 914
Moderator
vegaseat's Avatar
vegaseat vegaseat is offline Offline
DaniWeb's Hypocrite

Re: Why should i learn Python?

 
0
  #2
Jul 6th, 2005
Which of the 250 major computer languages are you learning? I need some idea so I can compare.
May 'the Google' be with you!
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 29
Reputation: Gargen is an unknown quantity at this point 
Solved Threads: 0
Gargen Gargen is offline Offline
Light Poster

Re: Why should i learn Python?

 
0
  #3
Jul 6th, 2005
im learning the ones that i have found i will be able to use C/C++/C# php java perl css html xhtml xml BASIC those are the ones so far i have found that will be useful but i know python is up there with the really big ones so im just wondering what i could use it for. I am currently focus on C++ and html. C++ becasue im looking to make my own game and html because im taking a class next year on it and i figure my as well learn it a head of time
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 3,947
Reputation: vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice 
Solved Threads: 914
Moderator
vegaseat's Avatar
vegaseat vegaseat is offline Offline
DaniWeb's Hypocrite

Re: Why should i learn Python?

 
0
  #4
Jul 7th, 2005
I use both C++ and Python and came up with this ...

My 13 point comparison of C++ and Python:
1. C++ and Python complement each other.
2. Maybe C++ is the piano and Python is the guitar.
3. C++ is a low level language and Python is a high level language (more modular).
4. You can write Python programs in just a few lines that would require pages in C++.
5. C++ requires type declarations and Python avoids type declarations.
6. Python containers are simpler and more flexible than C++ containers.
7. Python allows for easier experimentation/concept-development than C++.
8. C++ is compiled to an executable file and Python is compiled and then interpreted.
9. Python has an interactive page where you can quickly test ideas.
10. C++ is more difficult to master than Python. Python code is easier to read.
11. Both C++ and Python are object oriented.
12. Both C++ and Python work on multiple platforms (Windows, Unix, VMS etc).
13. C++ can be and Python is open source.

Edit: You may want to add ...
C++ is prone to memory leaks if you forget to free up used resources, Python has automatic memory management.
May 'the Google' be with you!
Reply With Quote Quick reply to this message  
Join Date: May 2005
Posts: 215
Reputation: shanenin is an unknown quantity at this point 
Solved Threads: 16
shanenin shanenin is offline Offline
Posting Whiz in Training

Re: Why should i learn Python?

 
0
  #5
Jul 7th, 2005
Originally Posted by vegaseat
Python is compiled and then interpreted
how is it compiled, I thought it is just interperted?
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 3,947
Reputation: vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice 
Solved Threads: 914
Moderator
vegaseat's Avatar
vegaseat vegaseat is offline Offline
DaniWeb's Hypocrite

Re: Why should i learn Python?

 
0
  #6
Jul 7th, 2005
The Python text code file .py is compiled to a .pyc byte code file that speeds up the interpretation process. Most of the time this is transparent to you. There are ways to retain the .pyc file and use it for higher speed.

Python itself uses the compiled files to speed things up. Look in your \Lib folder, there are both .py and .pyc files. the compiled files are not readable with a text editor.

Edit: You made me think about it some more and it finally came back. For ordinary .py code files the bytecode image of the .pyc file is created in memory. That's why you don't find them on the disk. You can force the creation of a .pyc file on disk, if you import the file in another program. Just write a short test program with the line:

import myPyFile # converts myPyFile.py to myPyFile.pyc

You can distribute your .pyc file instead of the .py file, if you want to hide your source code a little.
May 'the Google' be with you!
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 29
Reputation: Gargen is an unknown quantity at this point 
Solved Threads: 0
Gargen Gargen is offline Offline
Light Poster

Re: Why should i learn Python?

 
0
  #7
Jul 7th, 2005
Originally Posted by vegaseat
I use both C++ and Python and came up with this ...

My 13 point comparison of C++ and Python:
1. C++ and Python complement each other.
2. Maybe C++ is the piano and Python is the guitar.
3. C++ is a low level language and Python is a high level language (more modular).
4. You can write Python programs in just a few lines that would require pages in C++.
5. C++ requires type declarations and Python avoids type declarations.
6. Python containers are simpler and more flexible than C++ containers.
7. Python allows for easier experimentation/concept-development than C++.
8. C++ is compiled to an executable file and Python is compiled and then interpreted.
9. Python has an interactive page where you can quickly test ideas.
10. C++ is more difficult to master than Python. Python code is easier to read.
11. Both C++ and Python are object oriented.
12. Both C++ and Python work on multiple platforms (Windows, Unix, VMS etc).
13. C++ can be and Python is open source.
wow thx man python is on the list of things to do especaily if its easy to master
Reply With Quote Quick reply to this message  
Join Date: May 2005
Posts: 215
Reputation: shanenin is an unknown quantity at this point 
Solved Threads: 16
shanenin shanenin is offline Offline
Posting Whiz in Training

Re: Why should i learn Python?

 
0
  #8
Jul 7th, 2005
Python is my first language I am learning, other then some bash scripting. I am really enjoying it.

I am a big open source(linux) guy, so i was attracted to python for that reason. I also like the fact I can write a program that will run on both linux and windows alike(there may be some porting issues, I am still learning)
Reply With Quote Quick reply to this message  
Join Date: Dec 2003
Posts: 2,414
Reputation: alc6379 has a spectacular aura about alc6379 has a spectacular aura about alc6379 has a spectacular aura about 
Solved Threads: 123
Team Colleague
alc6379's Avatar
alc6379 alc6379 is offline Offline
Cookie... That's it

Re: Why should i learn Python?

 
0
  #9
Jul 8th, 2005
Originally Posted by shanenin
Python is my first language I am learning, other then some bash scripting. I am really enjoying it.

I am a big open source(linux) guy, so i was attracted to python for that reason. I also like the fact I can write a program that will run on both linux and windows alike(there may be some porting issues, I am still learning)
There shouldn't be too many porting issues-- Python was designed ground-up to work with any platform. Unless you start fooling around with GTK or Tk/Tcl, etc, then you'll be in good shape. Even with the previously mentioned setups, you can still make them work in Windows.
Alex Cavnar, aka alc6379
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 10
Reputation: Kschikan is an unknown quantity at this point 
Solved Threads: 2
Kschikan Kschikan is offline Offline
Newbie Poster

Re: Why should i learn Python?

 
0
  #10
Aug 5th, 2005
Not to mention that python is really easy to read. Although the lack of braces and forced indentation may seem weird to C/Java types (like I was before i ran into python) it makes it MUCH easier to tell what's going on in your code. Which is great when you have to come back to something you've done 6 months ago and wonder what the heck it was you wrote.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Python Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC