On Sun, Apr 27, 2008 at 9:39 AM, David Joyner <[EMAIL PROTECTED]> wrote:
>
> Hi:
> While in a sage session, I often times want to know if I'm in the
> main branch or some clone. Is there a command line way to fine out
> this information?
> I wonder if it to would be useful to anyone other than me. I'm guessing
> it not too much trouble, for example, to modify version() to return a
> pair - the version
> and the name of the clone branch one is in. I'd be happy to prepare
> a patch if I could get a hint on how to get started.
Here's a scary-looking 1-liner that will return the current branch:
os.popen("ls -l %s/devel/sage"%SAGE_ROOT).read().split()[-1][5:]
William
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---