[sage-support] Iverson Bracket

2016-11-14 Thread Jack Kennedy
Hi, how can I work with expressions with Iverson Brackets 
?
Example:



-- 
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 post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: Using Sage with PyCharm (all features)

2016-11-14 Thread Dima Pasechnik


On Monday, November 14, 2016 at 12:40:53 PM UTC, Rouven Dreimann wrote:
>
> Hello Everybody,
>
> I want to use Sage with PyCharm, but I got some problems. First of all:
> I start sage-shell with:
>
> ```sh
> sage -sh
>
> (sage-sh) rdreimann@C3XZ562:~$ ./pycharm-community-2016.2.3/bin/pycharm.sh
> ```
>
> Now my problem:
> Most of my code works fine then, but when I do something like this
>
> ```python
> Zx. = ZZ[]
> ``` 
>
> I got an error:
>
> ```
>Zx. = ZZ[];
>^
> SyntaxError: invalid syntax
> ```
>
> When I use a worksheet in my "normal" notbook() everything's fine...
>

Sage extends Python syntax by using a preparser; e.g.
 sage: preparse('Zx. = ZZ[]')
"Zx = ZZ['x']; (x,) = Zx._first_ngens(1)"

and so everything at Sage prompt is automatically preparsed.
I don't know whether you can force this upon PyCharm,
but you can still use everything you need using Python syntax.
Note that the Sage library is written this way (no preparser),
so there are plenty of examples there;
also e.g. your example would be just

import sage.all
from sage.all import ZZ
Zx = ZZ['x']
(x,) = Zx._first_ngens(1)
# or just   (x,)=Zx.gens()



Any ideas, how I can have all the sage features in my pycharm?
>
> Thanks
>

-- 
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 post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Using Sage with PyCharm (all features)

2016-11-14 Thread 'Rouven Dreimann' via sage-support
Hello Everybody,

I want to use Sage with PyCharm, but I got some problems. First of all:
I start sage-shell with:

```sh
sage -sh

(sage-sh) rdreimann@C3XZ562:~$ ./pycharm-community-2016.2.3/bin/pycharm.sh
```

Now my problem:
Most of my code works fine then, but when I do something like this

```python
Zx. = ZZ[]
``` 

I got an error:

```
   Zx. = ZZ[];
   ^
SyntaxError: invalid syntax
```

When I use a worksheet in my "normal" notbook() everything's fine...
Any ideas, how I can have all the sage features in my pycharm?

Thanks

-- 
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 post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.


[sage-support] Re: How could I import igraph or python-igraph in the python bundled with sage?

2016-11-14 Thread Dima Pasechnik


On Monday, November 7, 2016 at 1:28:03 PM UTC, Eden Harder wrote:
>
> That is, I installed sagemath with the command: brew cask install sage
>
> Homeberw cask  can manage MacOS 
> applications. I think there is no difference with installing sage in 
> another way.
>

I'm just wondering what precisely you get this way. Is it a specially 
prepared build of Sage, or is it simply repackaging
of one of our binary builds?

 

-- 
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 post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.