windows/python compatability

Frithiof Andreas Jensen frithiof.jensen at die_spammer_die.ericsson.com
Tue Jun 22 07:41:51 EDT 2004


"kluge" <eugene_dunn2001 at yahoo.com> wrote in message
news:1a00439d.0406211538.52097044 at posting.google.com...
> i'm a newbie to python. i'm learning to program and wanted to know how
> to tell which version of windows my finished python program will work

There is some system information in the "os" module.

i.e. os.environ contains what is there and os.getenv() reads a single value.

os.getenv('OS') f.ex. gets the name of the operating system; my box says
'Windows_NT' although it is really Win2k.

If you stick to using Python functions *only* for everything
"system-related" such as manipulating file paths (os.path may help), time
e.t.c. then your program will probably run on anything Python runs on.





More information about the Python-list mailing list