ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Experienced Python programmers will all agree that you should learn Python
Experienced Perl programmers will all agree that you should learn Perl
Experienced Java programmers will all agree that you should learn Java
Experienced COBOL programmers will all agree that you should learn COBOL
Personally, I find Python to be a nice enough language to be "worth using", but there's nothing interesting enough about it to make it "worth learning." It's good for some things, not so much for others. It depends on your motivation for wanting to learn it.
If you don't like it, you may prefer Perl or Ruby, which solve the same sorts of problems Python solves, but in different ways.
I know of at least a couple of things that use Python, such as scripting in Blender, and it is also used for Scons scripts. (A build system designed to try and replace the usual ./configure make make install process...) There may be other things that use it as well.
If you are interested in doing either of these, it is worth learning. Otherwise, I'm not sure. I really haven't used it much myself other than writing a few Blender scripts.
Python is interesting, but I really feel that Java is more "cross-platform" than Python because so far I have been able to run 100% of my Java programs on Linux which were created on Windows, but a certain Python program which used ncurses did not successfully run in another OS.
Is there any way to ensure that Python programs are 100% cross-platform or should one just avoid using the modules that appear to be specific to OSes?
If you do not use platform specific extensions (e.g. win32com for Windows), you should be OK. Anything in the Python standard library will note if a particular feature is only available on certain systems. Many third party modules will also point this out in their basic requirements.
Also, if you are really into Java, you may be more interested in jython-- it is the Java implementation of Python, and it has good integration with Java. You can access the Java libraries from jython. Jython does tend to lag Python in terms of development, however. Still, many of its proponents find it useful for quickly prototyping GUIs or whatnot or adding a scripting engine to their Java programs.
You have got it wrong about my intentions, I think. I am not looking for something that is a blend of Python and Java.
Sure, I like Java, but I will also continue learning Python for its own sake as well. It's a very powerful scripting language while Java is a general purpose language.
Both are good. And as I said before, I enjoyed programming a little "thought for the day" app in Python using ncurses.
File handling is a breeze. Constructs like for loops are very easy in Python as well.
And for me, given the basic documentation it takes a couple of hours for me to learn a new language (minus all the library/API and so on).
The only disadvantage with Python is that it needs all those modules installed on the target machine to work properly. If you are developing a large, feature-rich application, I think Java would definitely rank as a better choice because the Sun JRE is more standard across distributions. Python I think is better suited for UNIX-like environments although I know it's available for Windows too.
For somebody who's used to C, Perl may be more appropriate, as it's heavily based on C syntactically (& written in C underneath), inc ending standalone statements with
Also, if you use
(and you should), it'll force you to declare your variables before use.
Use 'my' vars in subs to emulate C's private vars; avoid globals where possible.
Hko, thanks for that link. Very interesting read. I am beginning to understand why people tend to love Python. It is quite powerful while making programs easier to write.
The only gripe I have is the documentation. Function parameters are hardly explained and I have had hell trying to pass "options" into certain functions, guessing each value one by one. Why don't the documentation writers tend to list out all the options for functions? I noticed this especially in the Tkinter documentation.
How the hell am I supposed to know the "options" passed to certain functions without having them listed out somewhere?
Very nice thread. I've been wondering about which languages to delve into for quite some time. I programmed a bit when C++ first came out, maybe 20 years? I don't really recall, but my thinking at the time was:
"Gee, this is a bit constipating, don't you think?" I gave it up and went on to other pursuits. (designing airplanes and such).
I got a bit excited again with VB. Don't laugh, I didn't even have to pay for the packages.
New pursuits........sky diving, building houses, and driving race cars. Put on hold.
Next up: I'm using my computer for practical stuff, Excel for running my biz, Word for writing, I'm thinking of really doing some Access apps, too. All this on a custom Win 98SE machine, don't you dig?
A few months ago, my box went borg up. I'm pissed, I've re-installed a zillion times, I can do it in my sleep. But still.........I get XP. I've got to do WHAT to validate??? Sure.........Go online, get some Linux and learn like crazy. What?? I feel like I've been raped. Sure, I played with Linux 10 years ago. But, where have I been? (Doing fun stuff, right?). Anyway, I'm learning a few distros at once, and am searching for a language to write custom apps.......My body won't let me jump out of perfectly good airplanes anymore.......
So, out of happenstance, I find this thread. I've been thinking perl? Python? Java? I don't have the lifespan of an orangutan, now do I? No way do become expert on all these.......It comes down to these two.......
Python or perl. I know, I know........"what are you going to do with it?"
HAVE FUN, naturally. My apps? Some specialized data bases, some work-arounds for Linux stuff, some apps for doing fun stuff with all the new hardware out there.......Mainly I'm on a mission: To tranform every sing win user to free software. What could be better?
there's a great site called 99 bottles (http://www.99-bottles-of-beer.net/abc.html) where you can see a simple program which prints on the screen the very well known song '99 bottles on the wall', written in 729 variations (some languages have more than one version).
it's a superb way to peek a little at what you're going to have to deal with.
(for perl, make sure you choose the 'standard version' (on the right))
now, i couldn't help laughing at myself when learning python. i wasn't at all prepared to meet something that easy! yet it's not like python doesn't let you do anything, and is just a scripting thing. you can do really quite a lot in it, you can write guis with qt (an excellent designer tool they provide), you can write a daemon, or you can just play with superkaramba.
finally, if you say
Mainly I'm on a mission: To tranform every sing win user to free software. What could be better?
why not switch to linux? linux is pretty much like windows with loads of extra software, all for free.
for the first try, you could choose knoppix (http://www.knoppix.org/), which you run directly off a cd, without installing anything.
I'm not a programmer. Much as I love Linux, FOSS et al, I'm not a computer professional, I'm merely a hobbyist.
I've wanted to be able to code for ages, but I've never been able to understand how to use languages like C. The definitive experience was probably when I borrowed a library book on learning C++ and was unable to understand any of the code used to generate "Hello, world!".
I gave up at that point. There was just too much to try and understand before even the basics would make sense. It reminded me of the joke "To understand recursion, you must first understand recursion." - To learn to code, you must first know how to code?
However, when I recently began looking at online Python documentation, I understood everything. I could follow the examples and build upon what they taught me to make more powerful examples.
It was enough to convince me to buy the O'Reilly book on Python (Which has a rat on the cover, go figure). I'm about eight chapters in, and so far I've understood everything.
This is unprecedented: I've never gotten anywhere with any other language. Not C, not Java, not even VB FFS!
So, while it might not be the best choice if you already can code, IMHO it is the single best language to try and learn if you can't code but want to.
Last edited by oneandoneis2; 07-06-2005 at 05:44 AM.