LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 07-04-2005, 03:36 PM   #16
caminoix
Member
 
Registered: Mar 2005
Location: cracow, poland
Distribution: Linnex, Gentoo, KateOS, PLD
Posts: 53

Rep: Reputation: 15

i've started learning python not long ago and so far i have to say:
python ROCKS!

it's easy but not simple. writing in it is a real pleasure
 
Old 07-04-2005, 05:07 PM   #17
rsheridan6
Member
 
Registered: Mar 2003
Location: Kansas City
Distribution: Debian unstable
Posts: 57

Rep: Reputation: 21
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

etc..

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.
 
Old 07-04-2005, 08:28 PM   #18
deiussum
Member
 
Registered: Aug 2003
Location: Santa Clara, CA
Distribution: Slackware
Posts: 895

Rep: Reputation: 31
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.

Last edited by deiussum; 07-04-2005 at 08:31 PM.
 
Old 07-04-2005, 08:53 PM   #19
vharishankar
Senior Member
 
Registered: Dec 2003
Posts: 3,142
Blog Entries: 4

Original Poster
Rep: Reputation: 121Reputation: 121
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?
 
Old 07-04-2005, 11:45 PM   #20
carl.waldbieser
Member
 
Registered: Jun 2005
Location: Pennsylvania
Distribution: Kubuntu
Posts: 197

Rep: Reputation: 32
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.

http://www.jython.org
 
Old 07-05-2005, 01:20 AM   #21
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,507

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
If you are really into Java, you may have a look to groovy
http://groovy.codehaus.org/
and beanshell
http://www.beanshell.org/
 
Old 07-05-2005, 01:50 AM   #22
vharishankar
Senior Member
 
Registered: Dec 2003
Posts: 3,142
Blog Entries: 4

Original Poster
Rep: Reputation: 121Reputation: 121
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.
 
Old 07-05-2005, 02:09 AM   #23
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,289

Rep: Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034
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
use strict;
(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.
 
Old 07-05-2005, 02:18 AM   #24
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,507

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
Quote:
Please do not post Linux vs. Windows threads or tell us why Linux sucks so much.
I see more "Windows sucks" than "Linux sucks" in this forum actually ...
Quote:
This is primarily a Linux help site.
True, but this particular forum (Programming) is not limited to Linux, and some others (*BSD, Solaris, AIX, Uther *NIX) are clearly targetting a wider audience.
 
Old 07-05-2005, 02:23 AM   #25
vharishankar
Senior Member
 
Registered: Dec 2003
Posts: 3,142
Blog Entries: 4

Original Poster
Rep: Reputation: 121Reputation: 121
Hey jlliagre,

That's my signature. Nothing to do with this topic
 
Old 07-05-2005, 11:38 AM   #26
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: ubuntu
Posts: 2,530

Rep: Reputation: 108Reputation: 108
Bruce Eckel wrote the "Thinking in ..." books (donwloadable as well) about C++, Java and python.

Here's what he thinks of Python:
http://www.artima.com/intv/aboutme.html
 
Old 07-05-2005, 09:45 PM   #27
vharishankar
Senior Member
 
Registered: Dec 2003
Posts: 3,142
Blog Entries: 4

Original Poster
Rep: Reputation: 121Reputation: 121
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?
 
Old 07-05-2005, 11:16 PM   #28
JoshR
LQ Newbie
 
Registered: Jun 2005
Location: Bodfish, CA
Distribution: Debian, Ubuntu,Mepis
Posts: 26

Rep: Reputation: 15
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?

JoshR
 
Old 07-06-2005, 03:28 AM   #29
caminoix
Member
 
Registered: Mar 2005
Location: cracow, poland
Distribution: Linnex, Gentoo, KateOS, PLD
Posts: 53

Rep: Reputation: 15
everyone, including JoshR

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))


JoshR

i don't know perl, so i can't really tell you but as you say you only want to have fun, i think python is the right choice for you. you say you have an idea about c++; i knew pascal, javascript and a bit of assembler when i started learning python, and i did start learning it because i tried to learn how to fetch a website with c++ and got scared by this whole socket stuff.
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
Quote:
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.
 
Old 07-06-2005, 04:26 AM   #30
oneandoneis2
Senior Member
 
Registered: Nov 2003
Location: London, England
Distribution: Ubuntu
Posts: 1,460

Rep: Reputation: 46
Well, FWIW, my take on it is this:

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 04:44 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is Visual Basic worth learning? titanium_geek Programming 20 07-07-2005 09:58 AM
GTK Programming Worth Learning drdroid Programming 3 04-14-2004 04:37 PM
Is it really worth learning vi at this point? Tyir Linux - General 8 02-24-2004 12:51 AM
Try Python, O'reilly Learning Python haknot Programming 5 02-15-2002 08:27 AM
Is scripting worth learning ChimpFace9000 Linux - General 3 07-05-2001 04:02 AM


All times are GMT -5. The time now is 06:09 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration