[sage-devel] catch a "sagemath" DeprecationWarning

2016-04-08 Thread João Pedro Cruz
Hello, I was expecting the following to catch the DeprecationWarning import warnings warnings.filterwarnings('error',category=DeprecationWarning) try: print (exp(x)*exp(3*x)).simplify_exp() #example with exp function except DeprecationWarning: print 'MegBook.py say: exercise needs revi

[sage-devel] Re: output results depending on platform

2016-03-08 Thread João Pedro Cruz
oh, that simple!! I should not program at late hours (portugal) :) Thank you ! Pedro terça-feira, 8 de Março de 2016 às 00:41:22 UTC, Nils Bruin escreveu: > > On Monday, March 7, 2016 at 4:22:04 PM UTC-8, João Pedro Cruz wrote: >> >> Hello, >> >> I would like to out

[sage-devel] output results depending on platform

2016-03-07 Thread João Pedro Cruz
Hello, I would like to output results with the following code: if MEGUA_PLATFORM=='sagews': fullpath = os.path.join(self.working_dir, self.unique_name()+'.tex') salvus.file(fullpath) else: #MEGUA_PLATFORM=='commandline' fullpath = os.path.join(s