Aravind wrote:
hi,
some of my friends told that python and java are similar in the idea of
platform independency.
Well, not quite IMHO.
Java treats the problem by taking the autistic attitude of pretending
the underlying platform doesn't exists - which can be a major PITA.
Python is much more pragmatic, and can even offer really strong
integration with the platform *without* sacrifying portability - the
core language is platform-independant and tries to help you wrinting
platform-independant code (cf the os and os.path modules), and
platform-specific stuff is usually isolated in distinct packages with a
BIG caution note on it !-)
Can anyone give me an idea as i'm a newbie to java
and python but used to C++. My idea is to develop an app which can run both
in windows and linux.
With a GUI ? If so, you probably want to check out wxPython or PyGTK
(wxPython will also buy you MacOS X IIRC, and wil perhaps be easier to
install on Windows).
Else (web, command-line, what else ?), you should not have any
particular problem as long as you avoid using platform-specific packages
and always use the portability helper features (ie os.path etc).
Coming from C++, you'll probably need a few days to grasp Python's
object model and idioms (Python looks much less like a dumbed-down C++
than Java), but my bet is that you'll be productive *way* sooner with
Python, and *much* more productive.
My 2 cents,
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'o****@xiludom.gro'.split('@')])"