Re: plateform info.

2005-09-22 Thread Mike Meyer
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

Re: plateform info.

2005-09-22 Thread Maurice LING
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

Re: plateform info.

2005-09-22 Thread Maurice LING
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

Re: plateform info.

2005-09-20 Thread Mikael Olofsson
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

Re: plateform info.

2005-09-20 Thread Juho Schultz
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