Thanks!

Do you think there is an advantage to using lsb_release over the 'platform'
Python module in sage/local/lib/python? My idea here is to limit execution
to within Sage (I'm assuming that this platform module can be imported in
any Sage, compiled / binary, so let me know if that is incorrect) until the
distro is pinned down, then to issue commands outside of Sage to gather more
in-depth information.

I.e., can I assume that something such as

sage: import platform
sage: platform.system().lower()
'linux'

will function consistently in different Sages? What happens in Mac OSX or
SunOS??

This allows then something like:

sage: platform.dist()
('debian', 'squeeze/sid', '')

Jason B. Hill



On Sat, Jun 26, 2010 at 12:09 AM, William Stein <[email protected]> wrote:

> On Fri, Jun 25, 2010 at 6:48 AM, Minh Nguyen <[email protected]>
> wrote:
> > Hi David,
> >
> > On Fri, Jun 25, 2010 at 11:40 PM, David Kirkby <[email protected]>
> wrote:
> >
> > <SNIP>
> >
> >> Of course, that could change over time. If you want to know your way
> >> around a Solaris system a bit more, here are some semi-useful commands
> >
> > Thank you for giving such a useful list of commands for getting
> > information about a Solaris system. Let me repay in kind for a Linux
> > system:
> >
> > $ uname -a
> > $ cat /etc/issue
> > $ cat /proc/cpuinfo
> > $ cat /proc/meminfo
>
> I think lsb_release provides the best canonical way to identify the
> Linux OS type.  It's part of the Linux Standards Base, and can be
> installed easily from the package system on most any linux distro.
>
> Some examples:
>
> wst...@sage:~$ lsb_release -d -s
> Ubuntu 8.04.4 LTS
> wst...@sage:~$ lsb_release -a
> No LSB modules are available.
> Distributor ID: Ubuntu
> Description:    Ubuntu 8.04.4 LTS
> Release:        8.04
> Codename:       hardy
>
>
> My script here computes canonical names for Sage binaries:
>
>  http://sage.math.washington.edu/home/wstein/bin/botdist
>
>
>
> --
> William Stein
> Professor of Mathematics
> University of Washington
> http://wstein.org
>
> --
> To post to this group, send an email to [email protected]
> To unsubscribe from this group, send an email to
> [email protected]<sage-devel%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/sage-devel
> URL: http://www.sagemath.org
>

-- 
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to