Maurice LING <[EMAIL PROTECTED]> writes:
> Is there a way of getting the path to the site-packages directory?
>>> import sys
>>> import os
>>> for dir in sys.path:
... if os.path.split(dir)[-1] == 'site-packages':
... print dir
...
/usr/opt/lib/python2.4/site-packages
>>>
But there's sel
Mikael Olofsson wrote:
> Monu Agrawal wrote:
>
>> Hi I want to know whether the program is being run on windows or on
>> Xnix. Is there any variable or method which tells me that it's windows?
>
>
> Will this help?
>
> >>> import sys
> >>> sys.platform
> 'win32'
>
> There is also the platfo
Mikael Olofsson wrote:
> Monu Agrawal wrote:
>
>> Hi I want to know whether the program is being run on windows or on
>> Xnix. Is there any variable or method which tells me that it's windows?
>
>
> Will this help?
>
> >>> import sys
> >>> sys.platform
> 'win32'
>
> There is also the platfor
Monu Agrawal wrote:
> Hi I want to know whether the program is being run on windows or on
> Xnix. Is there any variable or method which tells me that it's windows?
Will this help?
>>> import sys
>>> sys.platform
'win32'
There is also the platform module, that can give you a lot more
informati
Monu Agrawal wrote:
> Hi I want to know whether the program is being run on windows or on
> Xnix. Is there any variable or method which tells me that it's windows?
>
os.name - the value is "posix" for Linux/Unix, "nt" or "ce" for Windows,
and so on...
--
http://mail.python.org/mailman/listinfo/p