| | |
Why should i learn Python?
Please support our Python advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved |
•
•
Join Date: Jul 2005
Posts: 29
Reputation:
Solved Threads: 0
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
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.
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!
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.
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!
•
•
Join Date: Jul 2005
Posts: 29
Reputation:
Solved Threads: 0
•
•
•
•
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.
•
•
Join Date: May 2005
Posts: 215
Reputation:
Solved Threads: 16
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)
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)
•
•
•
•
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)
Alex Cavnar, aka alc6379
•
•
Join Date: Aug 2005
Posts: 10
Reputation:
Solved Threads: 2
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.
![]() |
Similar Threads
- Anyone want to learn Ruby (Ruby)
- Which language to learn? (Computer Science)
- Python! Thoughts? (Python)
- I want to learn python (Python)
Other Threads in the Python Forum
- Previous Thread: OOP Concept
- Next Thread: Problem implementing list in tabular format
Views: 4961 | Replies: 12
| Thread Tools | Search this Thread |
Tag cloud for Python
advanced anydbm app bash beginner bits calling chmod cmd code data dictionary directory dynamic edit examples excel external feet file float format ftp function gui homework http i/o images import info input ip itunes java keycontrol line linux list lists loan loop maintain millimeter mouse newb number numbers output panel parsing path port prime print program programming projects push py-mailer py2exe pygame pyqt python queue random rational recursion recursive scrolledtext smtp split ssh string strings sudokusolver table terminal text thread threading time tkinter tlapse tuple tutorial ubuntu unicode update urllib urllib2 variable variables ventrilo web webservice whileloop windows wxpython xlib






