Command-line options to Sage are handled by local/bin/sage (which is 
copied, or linked, or something, from src/bin/sage during installation).

  John


On Wednesday, March 12, 2014 4:27:40 PM UTC-7, Nitin Prasad wrote:
>
> I just wanted to clarify - I was wondering if you were familiar with where 
> Sage itself handles command line options. I've tried grepping sys.argv and 
> "command line option" but these don't seem to give me anywhere that Sage 
> handles these options. The best I've found is that /src/bin/run-sage 
> informs the user that there's an error if there's an invalid option, but it 
> appears the valid options are handled at some time before. 
>
> Thanks again for all your help, 
>
> Nitin 
>
> On Tuesday, March 11, 2014 5:52:34 PM UTC-5, John H Palmieri wrote:
>>
>> I'm sorry, I'm not that familiar with the IPython code. If you can't find 
>> anything helpful by grepping for "lightbg" or one of the other color scheme 
>> names, you could always ask on their mailing list (
>> http://mail.scipy.org/mailman/listinfo/ipython-dev).
>>
>> Sorry for not being more help.
>>
>>   John
>>
>>
>>
>> On Tuesday, March 11, 2014 3:21:45 PM UTC-7, Nitin Prasad wrote:
>>>
>>> John, 
>>>
>>> I've looked through the IPython documentations and it looks like the 
>>> colors can only be controlled by the configuration files only, or they can 
>>> be set by a command line argument to IPython upon startup, but it looks 
>>> like it won't be possible to do it on the fly. However, I've been having 
>>> trouble finding a centralized location where the command line arguments are 
>>> handled; would you be able to provide any guidance? 
>>>
>>> Thanks, 
>>>
>>> Nitin 
>>>
>>> On Sunday, March 9, 2014 7:02:05 PM UTC-5, John H Palmieri wrote:
>>>>
>>>> Maybe we don't need any more color schemes; I certainly don't have 
>>>> anything in mind. I just use the default one all of the time.
>>>>
>>>> Rather than a Makefile target, a Sage command to change on-the-fly 
>>>> would be nice. You might investigate whether IPython allows changing color 
>>>> schemes while it's running, or if it needs to be restarted for such 
>>>> changes 
>>>> to take effect. If the former, just provide access to that command. If the 
>>>> latter, at least updating the Installation guide with information about 
>>>> how 
>>>> to change it would be a start. A Makefile target is not appropriate since 
>>>> a 
>>>> sysadmin may be building and installing Sage for many users; instead, you 
>>>> want a run-time solution. Maybe a command-line flag ("sage --color=...")? 
>>>> This would just pass the appropriate configuration option to IPython.
>>>>
>>>> Also note http://trac.sagemath.org/ticket/14713, which updates the 
>>>> version of IPython in Sage. I'm guessing that the changes on that ticket 
>>>> will be available in the next beta release.
>>>>
>>>>   John
>>>>
>>>>
>>>>
>>>>
>>>> On Sunday, March 9, 2014 4:00:36 PM UTC-7, Nitin Prasad wrote:
>>>>>
>>>>> Thank you very much for the assistance! 
>>>>>
>>>>> I'd like to try to add the ability to toggle colors in sage itself. As 
>>>>> a new user (and developer), I'd appreciate you input. Would a good way to 
>>>>> go about this be to add a target to the Makefile that creates a file like 
>>>>> you described, and then create a function in sage that will modify this 
>>>>> upon request? Also, when you mentioned 
>>>>>
>>>>> "It might not be a bad idea to have several of our own pre-defined 
>>>>> color schemes"
>>>>>
>>>>> I noticed that the preset values of Linux and LightBG basically 
>>>>> correspond to dark and light background respectively, so making our own 
>>>>> color seems would be a bit redundant. Did you have any other color 
>>>>> schemes 
>>>>> in mind? 
>>>>>
>>>>> Thanks, 
>>>>>
>>>>> Nitin Prasad
>>>>>
>>>>> On Sunday, March 9, 2014 1:46:59 PM UTC-5, John H Palmieri wrote:
>>>>>>
>>>>>> The colors are controlled by IPython. You should be able to create a 
>>>>>> file $HOME/.sage/ipython-0.12/profile_sage/ipython_config.py with the 
>>>>>> lines
>>>>>>
>>>>>>     c = get_config()
>>>>>>     # Set the color scheme (NoColor, Linux, or LightBG).
>>>>>>     c.TerminalInteractiveShell.colors = 'Linux'
>>>>>>
>>>>>> for example, to change the color scheme. See 
>>>>>> http://ipython.org/ipython-doc/rel-1.0.0/config/old.html#color for 
>>>>>> some more information. You can also run "sage --ipython config -h" for a 
>>>>>> help message about configuring IPython.
>>>>>>
>>>>>> It might not be a bad idea to have several of our own pre-defined 
>>>>>> color schemes, with switches for the as Jan suggests...
>>>>>>
>>>>>>   John
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Sunday, March 9, 2014 8:13:02 AM UTC-7, Jan Groenewald wrote:
>>>>>>>
>>>>>>> Would be nice to have a general theme toggle. background=dark or 
>>>>>>> background=light, like vim. Also, on systems with default black 
>>>>>>> background 
>>>>>>> terminals, background=dark default would be nice.
>>>>>>>
>>>>>>> Regards,
>>>>>>> Jan
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On 9 March 2014 01:05, Nitin Prasad <[email protected]> wrote:
>>>>>>>
>>>>>>>> Hi all,
>>>>>>>>
>>>>>>>> I've started using Sage (mostly from the command line) and I've 
>>>>>>>> noticed by default a lot of the output text is colored blue. This is 
>>>>>>>> very 
>>>>>>>> difficult to see on the background of the terminal, so I was wondering 
>>>>>>>> if 
>>>>>>>> there was any way to change this easily? There was one topic posted 
>>>>>>>> here a 
>>>>>>>> while ago but that was about changing the color of the text on the 
>>>>>>>> notebook; I want this for the command line.
>>>>>>>>
>>>>>>>> --
>>>>>>>> You received this message because you are subscribed to the Google 
>>>>>>>> Groups "sage-support" group.
>>>>>>>> To unsubscribe from this group and stop receiving emails from it, 
>>>>>>>> send an email to [email protected].
>>>>>>>> To post to this group, send email to [email protected].
>>>>>>>> Visit this group at http://groups.google.com/group/sage-support.
>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> -- 
>>>>>>>   .~. 
>>>>>>>   /V\     Jan Groenewald
>>>>>>>  /( )\    www.aims.ac.za
>>>>>>>  ^^-^^ 
>>>>>>>  
>>>>>>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to