[Zope] sys_platform var

Christian Tismer tismer@tismer.com
Thu, 19 Jul 2001 12:53:03 +0200


Tim Cook wrote:
> 
> I have a need to test this var (sys_platform) that is found in
> App/dtml/cpContents.dtml but cannot figure out the correct
> context.
> 
> Thanks for any pointers.

I didn't test it, but I *guess* this is identical to
Python's sys.platform variable.
Just start a python shell from Windows or Linux and type
import sys
sys.platform

Windows2000:

C:\>python
Python 2.0.42-S1.4.18 (#8, Apr 18 2001, 21:40:17) [MSC 32 bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.platform
'win32'
>>>

SuSE Linux 7.2:

virtual:~ # python
Python 2.0 (#1, May 16 2001, 00:02:45)
[GCC 2.95.3 20010315 (SuSE)] on linux2
Type "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.platform
'linux2'
>>>


ciao - chris

-- 
Christian Tismer             :^)   <mailto:tismer@tismer.com>
Mission Impossible 5oftware  :     Have a break! Take a ride on Python's
Kaunstr. 26                  :    *Starship* http://starship.python.net/
14163 Berlin                 :     PGP key -> http://wwwkeys.pgp.net/
PGP Fingerprint       E182 71C7 1A9D 66E9 9D15  D3CC D4D7 93E2 1FAE F6DF
     where do you want to jump today?   http://www.stackless.com/