> How do I set an environment variable in the Sage code?
>

>From the command line, you can just do:

sage: import os

Then os.environ is a dictionary storing your environment variables. In
particular:

sage: os.environ['SAGE_BANNER'] = 'no'

sage: search_src("def", "MatrixSpace")
coding/sd_codes.py:def MS(n): n2 = ZZ(n)/2; return MatrixSpace(F, n2, n)
coding/sd_codes.py:def MS2(n): n2 = n.quo_rem(2)[0]; return
MatrixSpace(F, n2, n2)
matrix/matrix_space.py:def is_MatrixSpace(x):
matrix/matrix_space.py:def MatrixSpace(base_ring, nrows, ncols=None,
sparse=False):
groups/matrix_gps/matrix_group.py:        self.__matrix_space =
MatrixSpace(self.field_of_definition(), self.__n)
modular/abvar/homology.py:            Full MatrixSpace of 4 by 4 dense
matrices over Number Field in I with defining polynomial x^2 + 1
server/notebook/interact.py:            sage:
sage.server.notebook.interact.InputGrid('M', 2,2, default_value =
[[1,2],[3,4]], label='M', to_value=MatrixSpace(ZZ,2,2))
server/notebook/interact.py:            sage: input_grid(2,2, default
= [[1,2],[3,4]], label='M', to_value=MatrixSpace(ZZ,2,2))

-cc

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to