943,973 Members | Top Members by Rank

Ad:
  • Python Discussion Thread
  • Marked Solved
  • Views: 6920
  • Python RSS
You are currently viewing page 1 of this multi-page discussion thread
Jul 6th, 2005
0

Why should i learn Python?

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
Gargen is offline Offline
28 posts
since Jul 2005
Jul 6th, 2005
0

Re: Why should i learn Python?

Which of the 250 major computer languages are you learning? I need some idea so I can compare.
Moderator
Reputation Points: 1333
Solved Threads: 1403
DaniWeb's Hypocrite
vegaseat is offline Offline
5,792 posts
since Oct 2004
Jul 6th, 2005
0

Re: Why should i learn Python?

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
Reputation Points: 10
Solved Threads: 0
Light Poster
Gargen is offline Offline
28 posts
since Jul 2005
Jul 7th, 2005
0

Re: Why should i learn Python?

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.
Moderator
Reputation Points: 1333
Solved Threads: 1403
DaniWeb's Hypocrite
vegaseat is offline Offline
5,792 posts
since Oct 2004
Jul 7th, 2005
0

Re: Why should i learn Python?

Quote originally posted by vegaseat ...
Python is compiled and then interpreted
how is it compiled, I thought it is just interperted?
Reputation Points: 10
Solved Threads: 17
Posting Whiz in Training
shanenin is offline Offline
217 posts
since May 2005
Jul 7th, 2005
0

Re: Why should i learn Python?

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.
Moderator
Reputation Points: 1333
Solved Threads: 1403
DaniWeb's Hypocrite
vegaseat is offline Offline
5,792 posts
since Oct 2004
Jul 7th, 2005
0

Re: Why should i learn Python?

Quote 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
Reputation Points: 10
Solved Threads: 0
Light Poster
Gargen is offline Offline
28 posts
since Jul 2005
Jul 7th, 2005
0

Re: Why should i learn Python?

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)
Reputation Points: 10
Solved Threads: 17
Posting Whiz in Training
shanenin is offline Offline
217 posts
since May 2005
Jul 8th, 2005
0

Re: Why should i learn Python?

Quote 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.
Team Colleague
Reputation Points: 186
Solved Threads: 147
Cookie... That's it
alc6379 is offline Offline
2,519 posts
since Dec 2003
Aug 5th, 2005
0

Re: Why should i learn Python?

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.
Reputation Points: 10
Solved Threads: 2
Newbie Poster
Kschikan is offline Offline
10 posts
since Aug 2005

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Python Forum Timeline: Using the OS package in Python and removing data from a file?
Next Thread in Python Forum Timeline: Multiple Mainloops?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC