On Tue, Sep 16, 2008 at 10:51 PM, Bill Page wrote: > On Tue, Sep 16, 2008 at 10:46 PM, Mike Hansen wrote: >> ... >> It is better to put it somewhere in DOT_SAGE >> > > You mean like: > > out = self._eval_line(')cd '+DOT_SAGE+'/fricas/algebra', > reformat=False) > > How/when to create this directory? >
Here's another patch (stolen from gap.py): --- axiom.py-old 2008-09-16 19:38:34.000000000 -0700 +++ axiom.py-new 2008-09-16 19:57:52.000000000 -0700 @@ -155,6 +155,9 @@ seq = 0 COMMANDS_CACHE = '%s/axiom_commandlist_cache.sobj'%DOT_SAGE +if not os.path.exists('%s/fricas/algebra/'%DOT_SAGE): + os.makedirs('%s/fricas/algebra/'%DOT_SAGE) + # The Axiom commands ")what thing det" ")show Matrix" and ")display # op det" commands, gives a list of all identifiers that begin in @@ -244,7 +247,7 @@ out = self._eval_line(')set functions compile on', reformat=False) out = self._eval_line(')set output length 245', reformat=False) out = self._eval_line(')set message autoload off', reformat=False) - out = self._eval_line(')cd '+SAGE_ROOT+'/local/lib/fricas/target/x86_64-unknown-linux/algebra', reformat=False) + out = self._eval_line(')cd '+DOT_SAGE+'/fricas/algebra', reformat=False) def _read_in_file_command(self, filename): """ ----- [EMAIL PROTECTED]:~$ ~/sage-3.1.2*/sage ---------------------------------------------------------------------- | SAGE Version 3.1.2.alpha4, Release Date: 2008-09-02 | | Type notebook() for the GUI, and license() for information. | ---------------------------------------------------------------------- sage: axiom.compile(''' ....: )abbrev package FOO Foo ....: Foo():with ....: bar: Integer->Integer ....: == add ....: bar(x) == x+1 ....: ''') FOO abbreviates package Foo initializing NRLIB FOO for Foo compiling exported bar : Integer -> Integer FOO;bar;2I;1 is replaced by +x1 Cumulative Statistics for Constructor Foo finalizing NRLIB FOO Processing Foo for Browser database: WARNING in |FOO;bar;2I;1| in line 6 : variable $ is not used. Misspelled or missing IGNORE declaration? 0 errors, 1 warning Foo is now explicitly exposed in frame initial Foo will be automatically loaded when needed from /home/page/.sage/fricas/algebra/FOO.NRLIB/code sage: exit Exiting SAGE (CPU time 0m0.06s, Wall time 0m4.99s). Exiting spawned Axiom process. [EMAIL PROTECTED]:~$ ~/sage-3.1.2*/sage ---------------------------------------------------------------------- | SAGE Version 3.1.2.alpha4, Release Date: 2008-09-02 | | Type notebook() for the GUI, and license() for information. | ---------------------------------------------------------------------- sage: print axiom.eval(')lib FOO') Foo is now explicitly exposed in frame initial Foo will be automatically loaded when needed from /home/page/.sage/fricas/algebra/FOO.NRLIB/code sage: axiom.bar(1) 2 sage: Regards, Bill Page. --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---