Re: [sage-support] import

2021-10-07 Thread cyrille.piate...@univ-orleans.fr
Merci. J'ai encore une question très simple. J'ai essayé e convaincre une 
mathématicienne de mon université d'abandonner Scilab et de passer à Sagemath 
(Python s'universalise partout et les banques ne veulent plus payer les droits 
exorbitants de logiciels comme SAS). Son argument est qu'un logiciel de qui 
fait de la théorie est plus lent qu'un logiciel de calcul numérique. Mais non 
seulement Sagemath délègue mais en plus on peut compiler. Connaissez vous des 
études ou ds articles qui pourraient appuyer mon propos ? 


De: "Emmanuel Charpentier"  
À: "sage-support"  
Envoyé: Mercredi 6 Octobre 2021 13:50:27 
Objet: Re: [sage-support] import 



Je ne peux rien pour votre compte. En revanche, ceci devrait vous éclairer : 
sage: Ex = x > 3
sage: Ex.lhs()
x
sage: Ex.rhs()
3
sage: Ex.operator()

# Kekcékçà ?
sage: import_statements(Ex.operator())
from _operator import gt
# Et d'ailleurs :
sage: Ex.operands()
[x, 3] 


À la vôtre ! 
​ 
Le lundi 4 octobre 2021 à 16:39:40 UTC+2, cyrille piatecki a écrit : 



Navré de vous déranger Samuel, 

mais mon compte semble ne plus fonctionner et malgré tous mes efforts je 
n'arrive pas à le récupérer. Que dois-je faire ? 

Incidemment, je recherchait comment avoir accès aux signes <= ou >= dans une 
inégalité (.lhs() pour le terme de gauche, .rhs() pour le terme de droite mais 
pour le signe ? 

Cordialement 

Cyrille Piatecki 


De: "slelievre" < [ https://partage.univ-orleans.fr/href | samuel@gmail.com 
] > 
À: "sage-support" < [ https://partage.univ-orleans.fr/href | 
sage-s...@googlegroups.com ] > 
Envoyé: Dimanche 26 Septembre 2021 15:06:59 
Objet: Re: [sage-support] import 

A web search for [ import ipynb ] 
[ https://duckduckgo.com/?q=import+ipynb | 
https://duckduckgo.com/?q=import+ipynb ] 

also reveals tools such as ipynb and import-ipynb, 
which can be pip-installed. --Samuel 



-- 
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 [ https://partage.univ-orleans.fr/href | sage-support...@googlegroups.com ] 
. 
To view this discussion on the web visit [ 
https://groups.google.com/d/msgid/sage-support/e9489c5e-9aa2-4e42-889a-45469eea7b06n%40googlegroups.com?utm_medium=email_source=footer
 | 
https://groups.google.com/d/msgid/sage-support/e9489c5e-9aa2-4e42-889a-45469eea7b06n%40googlegroups.com
 ] . 





-- 
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 [ mailto:sage-support+unsubscr...@googlegroups.com | 
sage-support+unsubscr...@googlegroups.com ] . 
To view this discussion on the web visit [ 
https://groups.google.com/d/msgid/sage-support/338a074b-672f-49b4-9535-709975ccc769n%40googlegroups.com?utm_medium=email_source=footer
 | 
https://groups.google.com/d/msgid/sage-support/338a074b-672f-49b4-9535-709975ccc769n%40googlegroups.com
 ] . 

-- 
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 sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/1122764328.8785214.1633622968406.JavaMail.zimbra%40univ-orleans.fr.


Re: [sage-support] import

2021-10-06 Thread Emmanuel Charpentier


Je ne peux rien pour votre compte. En revanche, ceci devrait vous éclairer :

sage: Ex = x > 3
sage: Ex.lhs()
x
sage: Ex.rhs()
3
sage: Ex.operator()

# Kekcékçà ?
sage: import_statements(Ex.operator())
from _operator import gt
# Et d'ailleurs :
sage: Ex.operands()
[x, 3]

À la vôtre !
​
Le lundi 4 octobre 2021 à 16:39:40 UTC+2, cyrille piatecki a écrit :

> Navré de vous déranger Samuel,
>
> mais mon compte semble ne plus fonctionner et malgré tous mes efforts je 
> n'arrive pas à le récupérer. Que dois-je faire ?
>
> Incidemment,  je recherchait comment avoir accès aux signes <= ou >= dans 
> une inégalité (.lhs() pour le terme de gauche, .rhs() pour le terme de 
> droite mais pour le signe ?
>
> Cordialement
>
> Cyrille Piatecki
>
> --
> *De: *"slelievre" 
> *À: *"sage-support" 
> *Envoyé: *Dimanche 26 Septembre 2021 15:06:59
> *Objet: *Re: [sage-support] import
>
> A web search for [ import ipynb ]
>   https://duckduckgo.com/?q=import+ipynb 
>
> also reveals tools such as ipynb and import-ipynb,
> which can be pip-installed.  --Samuel
>
> -- 
> 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 sage-support...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-support/e9489c5e-9aa2-4e42-889a-45469eea7b06n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/sage-support/e9489c5e-9aa2-4e42-889a-45469eea7b06n%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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 sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/338a074b-672f-49b4-9535-709975ccc769n%40googlegroups.com.


Re: [sage-support] import

2021-10-04 Thread cyrille.piate...@univ-orleans.fr
Navré de vous déranger Samuel, 

mais mon compte semble ne plus fonctionner et malgré tous mes efforts je 
n'arrive pas à le récupérer. Que dois-je faire ? 

Incidemment, je recherchait comment avoir accès aux signes <= ou >= dans une 
inégalité (.lhs() pour le terme de gauche, .rhs() pour le terme de droite mais 
pour le signe ? 

Cordialement 

Cyrille Piatecki 


De: "slelievre"  
À: "sage-support"  
Envoyé: Dimanche 26 Septembre 2021 15:06:59 
Objet: Re: [sage-support] import 

A web search for [ import ipynb ] 
https://duckduckgo.com/?q=import+ipynb 

also reveals tools such as ipynb and import-ipynb, 
which can be pip-installed. --Samuel 


-- 
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 [ mailto:sage-support+unsubscr...@googlegroups.com | 
sage-support+unsubscr...@googlegroups.com ] . 
To view this discussion on the web visit [ 
https://groups.google.com/d/msgid/sage-support/e9489c5e-9aa2-4e42-889a-45469eea7b06n%40googlegroups.com?utm_medium=email_source=footer
 | 
https://groups.google.com/d/msgid/sage-support/e9489c5e-9aa2-4e42-889a-45469eea7b06n%40googlegroups.com
 ] . 

-- 
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 sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/325354374.2338758.1633358373614.JavaMail.zimbra%40univ-orleans.fr.


Re: [sage-support] import

2021-09-26 Thread slelievre
A web search for [ import ipynb ]

  https://duckduckgo.com/?q=import+ipynb 

also reveals tools such as ipynb and import-ipynb,
which can be pip-installed.  --Samuel

-- 
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 sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/e9489c5e-9aa2-4e42-889a-45469eea7b06n%40googlegroups.com.


Re: [sage-support] import

2021-09-26 Thread Dima Pasechnik
They have a tool, nbmerge, to merge notebooks.
https://github.com/jupyter/nbconvert/issues/253

Beyond this, no, you really would need to have code either in *.sage file,
and load() it in a Sage notebook,
or have a *.py file, and import it in the usual Python way.

HTH
Dima

On Sun, Sep 26, 2021 at 9:31 AM Henri Girard  wrote:

> Hi,
>
> Iq there a way to import function from a sage notebook to another notebook
> ?
>
> I have long graphic one about 30 lines and I would like to show the
> graphic in another notebook, like with an attach method "show(g)" with
> import  and be able to add functions ?
>
> Any help welcome
>
> best
>
> Henri
>
> --
> 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 sage-support+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-support/8d263aea-08c8-20b5-d412-b5db2bcc7ca0%40gmail.com
> .
>

-- 
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 sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CAAWYfq3DBOv848FhPQ1Z26nyv%2B6N5B4kbcHWLnFeMtuZO%3DDF%2Bg%40mail.gmail.com.


Re: [sage-support] Import error for lrcalc library

2021-02-04 Thread slelievre
This was reported to the Arch Linux forums:

https://bbs.archlinux.org/viewtopic.php?id=263214

-- 
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 sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/ee417737-6ebf-43d7-a001-fcf4b426f7a2n%40googlegroups.com.


Re: [sage-support] Import error for lrcalc library

2021-02-01 Thread Matthias Koeppe
As Dima said, please report bugs of distribution packaging of Sage to the 
distribution.

On Monday, February 1, 2021 at 8:29:17 AM UTC-8 tiger...@gmail.com wrote:

> I should also add this.
> If from an ipython module I invoke `from sage.misc.misc_c import prod`, 
> everything works fine.
> On the other hand, `from sage.rings.all import RealField` works well 
> inside ipython, but produce a different error from a source file.
> Relevant link https://pastebin.com/AMfd0hhh
> On Monday, 1 February 2021 at 14:50:47 UTC+1 dim...@gmail.com wrote:
>
>> This has to be reported to Arch people. 
>>
>> On Mon, Feb 1, 2021 at 1:39 PM Simone Perriello  
>> wrote: 
>> > 
>> > 
>> > Operating system: ArchLinux. 
>> > Sage installed through official packages. 
>> > If I just launch `sage` from terminal it gives this stacktrace 
>> https://pastebin.com/s1FnMhe2 
>> > 
>> > The same happens if I try to do a `from sage.all import *` from 
>> ipython, from a python file or from sage -python. 
>> > 
>> > -- 
>> > 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 sage-support...@googlegroups.com. 
>> > To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/sage-support/09226af6-af8a-4353-bfbc-87bab86c3603n%40googlegroups.com.
>>  
>>
>>
>

-- 
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 sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/6f8fcaef-3ec1-4a03-b50d-6b10ac92c945n%40googlegroups.com.


Re: [sage-support] Import error for lrcalc library

2021-02-01 Thread Simone Perriello
I should also add this.
If from an ipython module I invoke `from sage.misc.misc_c import prod`, 
everything works fine.
On the other hand, `from sage.rings.all import RealField` works well inside 
ipython, but produce a different error from a source file.
Relevant link https://pastebin.com/AMfd0hhh
On Monday, 1 February 2021 at 14:50:47 UTC+1 dim...@gmail.com wrote:

> This has to be reported to Arch people.
>
> On Mon, Feb 1, 2021 at 1:39 PM Simone Perriello  
> wrote:
> >
> >
> > Operating system: ArchLinux.
> > Sage installed through official packages.
> > If I just launch `sage` from terminal it gives this stacktrace 
> https://pastebin.com/s1FnMhe2
> >
> > The same happens if I try to do a `from sage.all import *` from ipython, 
> from a python file or from sage -python.
> >
> > --
> > 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 sage-support...@googlegroups.com.
> > To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-support/09226af6-af8a-4353-bfbc-87bab86c3603n%40googlegroups.com
> .
>

-- 
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 sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/6c76f187-b523-42de-a2a6-cc7dbd0056b8n%40googlegroups.com.


Re: [sage-support] Import error for lrcalc library

2021-02-01 Thread Dima Pasechnik
This has to be reported to Arch people.

On Mon, Feb 1, 2021 at 1:39 PM Simone Perriello  wrote:
>
>
> Operating system: ArchLinux.
> Sage installed through official packages.
> If I just launch `sage` from terminal it gives this stacktrace 
> https://pastebin.com/s1FnMhe2
>
> The same happens if I try to do a `from sage.all import *` from ipython, from 
> a python file  or from sage -python.
>
> --
> 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 sage-support+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-support/09226af6-af8a-4353-bfbc-87bab86c3603n%40googlegroups.com.

-- 
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 sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/CAAWYfq0R0dNpy4oXc7a%3D7hRbHe3h8fYAy3KytnFqG80F2Z0oCA%40mail.gmail.com.


Re: [sage-support] import .sage file [was : Evaluating Symbolic Expressions]

2011-11-02 Thread Laurent

Hi,

I think its a issue of parsing. If your file is called hello.py it
gives the errors you mentioned. However if you call your file
hello.sage it works. If you call your file hello.sage and run

sage hello.sage

it generates a hello.py which I append below -


I know that, but I never understood how to use it because if my file is 
named hello.sage, I cannot do

import hello.sage
in an other file. But if it is named hello.py, I can write
import hello

I admit I never got trough the doc about that issue ;)

Laurent

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


Re: [sage-support] import .sage file [was : Evaluating Symbolic Expressions]

2011-11-02 Thread William Stein
On Wed, Nov 2, 2011 at 3:22 AM, Laurent moky.m...@gmail.com wrote:
 Hi,

 I think its a issue of parsing. If your file is called hello.py it
 gives the errors you mentioned. However if you call your file
 hello.sage it works. If you call your file hello.sage and run

 sage hello.sage

 it generates a hello.py which I append below -

 I know that, but I never understood how to use it because if my file is
 named hello.sage, I cannot do
 import hello.sage
 in an other file. But if it is named hello.py, I can write
 import hello

 I admit I never got trough the doc about that issue ;)

.sage files are not meant to be used like normal Python modules.  You
can only load or attach them.  I implemented this in 2005, when I was
basically implementing something like Magma on top of Python.  I'm not sure
this is good or bad, but I definitely find

   sage: attach file.sage

to be *useful* in practice.

William


 Laurent

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




-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

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


Re: [sage-support] import .sage file [was : Evaluating Symbolic Expressions]

2011-11-02 Thread Laurent



.sage files are not meant to be used like normal Python modules.  You
can only load or attach them.  I implemented this in 2005, when I was
basically implementing something like Magma on top of Python.  I'm not sure
this is good or bad, but I definitely find

sage: attach file.sage

to be *useful* in practice.


Yep, attach is really usefull. However I've some big bunches of code 
using sage divided in several packages and I thus have to name them .py 
:) And then I have to use the difficult syntax.


It's not really an issue, but when I began I has some difficulties to 
understand why some pieces of code was working in a context and 
nonworking in an other.



Have a good afternoon,
Laurent

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


Re: [sage-support] Import Ellipse module?

2011-05-27 Thread Rajeev Singh
On Thu, May 26, 2011 at 10:26 PM, Mel chemmyg...@gmail.com wrote:

 Do I need to download/load something before I can import the ellipse
 module?

 When I type
from sage.plot.ellipse import Ellipse
 I get ImportError: No module named ellipse

 Thanks!

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


I don't get any error when I execute the above line with sage-4.6.2 on
debian.

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


Re: [sage-support] Import a Data file

2010-03-04 Thread Robert Bradshaw

On Mar 4, 2010, at 12:10 PM, Oscar Castillo-Felisola wrote:


Hi everybody,
I'd like to know if it is possible to import data into Sage, so that
plots (or other manipulation) might be done.


Yes, it's possible.

- Robert

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