LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   Python (http://www.linuxquestions.org/questions/programming-9/python-910299/)

huntaz556 10-26-2011 11:46 AM

Python
 
What kind of diffrent programs can python make? i was wondering because i like the simplicity of python code and can it make programs that say ? c++ or c# could make i would rather keep learning python instead of learning any form of C i wouldnt be making games just programs im not sure what yet ..

TobiSGD 10-26-2011 12:04 PM

You can make any kind of programs with Python. Even games are possible.

macemoneta 10-26-2011 12:12 PM

Languages that are classified as "Turing Complete" (including Python) can all accomplish the same functions. The difference will be the ease of use for a given application, resource usage, and performance.

Because the personal computers we use today have so much resource and such high performance, the selection of a language usually comes down to ease of use. Python is very easy to learn, and has been broadly extended with many add-ons that make specific tasks simpler or provide higher performance. As a result, as TobiSGD indicated, Python is suitable for almost any type of program.

huntaz556 10-26-2011 12:27 PM

Quote:

Originally Posted by macemoneta (Post 4509020)
Languages that are classified as "Turing Complete" (including Python) can all accomplish the same functions. The difference will be the ease of use for a given application, resource usage, and performance.

Because the personal computers we use today have so much resource and such high performance, the selection of a language usually comes down to ease of use. Python is very easy to learn, and has been broadly extended with many add-ons that make specific tasks simpler or provide higher performance. As a result, as TobiSGD indicated, Python is suitable for almost any type of program.

Okay good :D i like python and want to keep learning it. and another thing with python i know you can package a python program as a .deb for ubuntu what about as a .exe for windows ?

macemoneta 10-26-2011 12:31 PM

Yes, you can do that.

huntaz556 10-26-2011 12:33 PM

Awesome thank you guys so much i can continue on with python ! haha. but the best way for me to learn is for me to have a project to do otherwise i get distracted and dont feel like im doing anything . so can you give me some ideas on a project to do ? thanks !

TobiSGD 10-26-2011 01:27 PM

Have a look at your current Linux installation and think about a small program that would make the OS more usable for you. Then try to write it. Or try to write a little game with PyGame.

huntaz556 10-26-2011 01:30 PM

Quote:

Originally Posted by TobiSGD (Post 4509077)
Have a look at your current Linux installation and think about a small program that would make the OS more usable for you. Then try to write it. Or try to write a little game with PyGame.

hm.. i made a bash script that formatted my flashdrive and then made a backup of a selected directory to that flashdrive can you do that with python?

TobiSGD 10-26-2011 02:11 PM

Of course you can. I think it will end in just calling commands like you would do with a Bash script, but it is nonetheless possible.

huntaz556 10-26-2011 02:13 PM

Quote:

Originally Posted by TobiSGD (Post 4509112)
Of course you can. I think it will end in just calling commands like you would do with a Bash script, but it is nonetheless possible.

haha alright any other ideas?

im running ubuntu linux by the way if that changed anything for some reason lol

MTK358 10-26-2011 02:42 PM

Python can do anything that can be done with any other language, except for really low-level stuff (which is only necessary if you're writing an operating system ar a device driver).

And since it's interpreted (and not run directly on the CPU), it's slower than languages like C. But this is not an issue for most applications.


All times are GMT -5. The time now is 12:15 AM.