On Wed, Jun 4, 2008 at 9:23 AM, William Stein <[EMAIL PROTECTED]> wrote:
> On Wed, Jun 4, 2008 at 9:22 AM, Giovanni Samaey
> <[EMAIL PROTECTED]> wrote:
>>
>> waw, this is wonderful !  Thanks.  Not only does everything work now,
>> but it also goes much faster !
>>
>> Thanks for the quick reply and the wonderful package !
>>
>> One question that I have now (but that isn't urgent): is there a
>> convenient way to perform parts of a notebook in python; and different
>> parts in sage (e.g. for symbolic stuff) and cast the results of python
>> to sage only when I need to input them in that part ?
>
> Yes, well mostly.  If you switch the mode back to sage (in the top middle),
> then whenever you put
>
> %python
>
> as the first line of the cell, then that cell only will be entirely
> evaluated in pure-python mode.     However, the namespace
> is exactly the same.

Oh, by the way, you can still use all the symbolic stuff in Python mode:

E.g.,

{{{
%python
integrate(sin(x)*log(2*x**2), x)
///
2*integrate(cos(x)/x, x) - 2*cos(x)*log(x) - log(2)*cos(x)
}}}

just make sure you use ** for exponentiation, etc. since you won't
get any Sage "preparsing".  But otherwise Sage is just Python + a big
library.

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
-~----------~----~----~----~------~----~------~--~---

Reply via email to