python: cross-platform?

Sean 'Shaleh' Perry shalehperry at attbi.com
Tue May 7 12:12:59 EDT 2002


On 07-May-2002 Eric Texier wrote:
> Is there a guide line for writing cross-platform code in python. I am
> dealing with only one os for now but I would like to be sure that I am
> using only cross platform code.
> Thanks in advance
> 

most of the modules shipped with python are OS neutral.

An important thing to remember is file paths change on each OS.  Windows uses a
drive letter and backslash, UNIX uses forward slashes, etc.  The os.path module
tries to hide these details.





More information about the Python-list mailing list