portability

Gillou nospam at bigfoot.com
Tue Jul 31 07:03:32 EDT 2001


Read carefully the docs of various APIs of the standard library and don'use
what's OS specific.
Some modules/packages are not available for Windows, others for Unix, and
others for classic MacOS.
Python is not as portable as Java, because standard Java API does not
provide system specific classes.
The main difference is :

* 100% pure java code is (supposed to be) portable.
* Python programmers must choose and use carefully the packages/classes to
provide portable applications. It's just like in C/C++.

In example, you can't get the value of an environment variable in "100% pure
Java".
You can't use COM objects in "100% pure Java".
You can't write Unix system utilities in "100% pure Java".
(...)
That's the price of Java portability.

--Gillou

"franck delarue" <franck.delarue at rd.francetelecom.com> a écrit dans le
message news: 9k5u2c$p542 at news.rd.francetelecom.fr...
> hello everyone,
> i'm working on python on linux red hat and i'm wandering if all the code
> that i've written would be portable to unix or windows (except the system
> calls of course). I know that python works a little like java ( on a
virtual
> machine), but is Python as portable as java ?
>
> thanks in advance.
>
>





More information about the Python-list mailing list