<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://forum.ubuntu-fr.org/extern.php?action=feed&amp;tid=1176161&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Forum Ubuntu-fr.org / [Astuce] Calculatrice Numpy dans Python dans un Terminal [Résolu]]]></title>
		<link>http://forum.ubuntu-fr.org/viewtopic.php?id=1176161</link>
		<description><![CDATA[Les sujets les plus récents dans [Astuce] Calculatrice Numpy dans Python dans un Terminal [Résolu].]]></description>
		<lastBuildDate>Wed, 30 Jan 2013 16:37:02 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Astuce] Calculatrice Numpy dans Python dans un Terminal [Résolu]]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=12399581#p12399581</link>
			<description><![CDATA[<p>Aujourd&#039;hui j&#039;ai fait une petite mise à jour :</p><div class="codebox"><pre><code>gnome-terminal --title=Numpy -e &quot;python -i -c \&quot;from numpy import *; from math import *; print &#039;Numpy and math loaded&#039; \&quot;&quot;</code></pre></div><p>pour avoir des fonctions en plus, en particulier erfc(x) et assimilées.</p><p>J&#039;ai aussi mis cette ligne de commande en raccourci clavier (super+C).</p>]]></description>
			<author><![CDATA[dummy@example.com (goyou)]]></author>
			<pubDate>Wed, 30 Jan 2013 16:37:02 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=12399581#p12399581</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Astuce] Calculatrice Numpy dans Python dans un Terminal [Résolu]]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=12317711#p12317711</link>
			<description><![CDATA[<p>&quot;terminal&quot; c&#039;est sur openSuse.<br />Mais je suis sur xfce en vrai donc j&#039;ai mis xfce4-terminal.</p><p>Finalement le programme fonctionne parfaitement lorsque je l&#039;appelle depuis le menu des applications mais ne se lance pas en l&#039;appelant depuis synapse.</p>]]></description>
			<author><![CDATA[dummy@example.com (goyou)]]></author>
			<pubDate>Wed, 23 Jan 2013 17:15:13 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=12317711#p12317711</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Astuce] Calculatrice Numpy dans Python dans un Terminal [Résolu]]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=12314281#p12314281</link>
			<description><![CDATA[<div class="quotebox"><cite>goyou a écrit&#160;:</cite><blockquote><div><p>(je peux remplacer gnome-terminal par terminal si je ne suis pas sous gnome)</p></div></blockquote></div><p>Il faut le remplacer par la commande pour lancer un terminal. Sous GNOME et Unity c&#039;est <em>gnome-terminal</em>, sous KDE c&#039;est <em>konsole</em>, sous XFce c&#039;est <em>xfce4-terminal</em>...<br />Mais je n&#039;en connais pas qui se lance avec la commande &quot;terminal&quot; tout court.</p><div class="quotebox"><cite>goyou a écrit&#160;:</cite><blockquote><div><p>La petite dernière question subsidiaire : à quoi sert StartupNotify=true|false ?</p></div></blockquote></div><p>C&#039;est notamment pour faire apparaître le curseur de chargement au lieu du curseur classique.<br /><a href="http://developer.gnome.org/integration-guide/stable/startup-notification.html.en">http://developer.gnome.org/integration- … on.html.en</a></p>]]></description>
			<author><![CDATA[dummy@example.com (tiramiseb)]]></author>
			<pubDate>Wed, 23 Jan 2013 13:06:19 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=12314281#p12314281</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Astuce] Calculatrice Numpy dans Python dans un Terminal [Résolu]]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=12314151#p12314151</link>
			<description><![CDATA[<p>Owkèy !!<br />ça marche comme ceci :</p><div class="codebox"><pre><code>gnome-terminal --title=Numpy -e &quot;python -i -c \&quot;from numpy import *; print &#039;Numpy loaded&#039; \&quot;&quot;</code></pre></div><p>(je peux remplacer gnome-terminal par terminal si je ne suis pas sous gnome)<br />C&#039;est grâce aux backslashes que l&#039;on résout le problème des guillemets !!<br />Donc en résumé, pour créer l&#039;application je crée simplement le fichier suivant :</p><p>/usr/share/applications/calcupy.desktop</p><div class="codebox"><pre><code>[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=Calcul Numpy
GenericName=calcupy
Comment=Calculatrice python en terminal
Icon=accessories-calculator
Exec=gnome-terminal --title=Numpy -e &quot;python -i -c \&quot;from numpy import *; print &#039;Numpy loaded&#039; \&quot;&quot;
Terminal=false
StartupNotify=true
Categories=Sciences
Path=~</code></pre></div><p>Merci beaucoup je suis impressionné par la rapidité et l&#039;exactitude de vos réponses.<br />La petite dernière question subsidiaire : à quoi sert StartupNotify=true|false ?</p>]]></description>
			<author><![CDATA[dummy@example.com (goyou)]]></author>
			<pubDate>Wed, 23 Jan 2013 13:00:43 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=12314151#p12314151</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Astuce] Calculatrice Numpy dans Python dans un Terminal [Résolu]]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=12313781#p12313781</link>
			<description><![CDATA[<p>En vrai t&#039;es même pas désolé j&#039;suis sûr <img src="http://forum.ubuntu-fr.org/img/smilies/tongue.png" width="15" height="15" alt="tongue" /></p>]]></description>
			<author><![CDATA[dummy@example.com (tiramiseb)]]></author>
			<pubDate>Wed, 23 Jan 2013 12:46:50 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=12313781#p12313781</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Astuce] Calculatrice Numpy dans Python dans un Terminal [Résolu]]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=12313761#p12313761</link>
			<description><![CDATA[<p>@tiramiseb #9 : Je suis désolé <img src="http://forum.ubuntu-fr.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[dummy@example.com (pingouinux)]]></author>
			<pubDate>Wed, 23 Jan 2013 12:46:13 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=12313761#p12313761</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Astuce] Calculatrice Numpy dans Python dans un Terminal [Résolu]]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=12313721#p12313721</link>
			<description><![CDATA[<div class="quotebox"><cite>goyou a écrit&#160;:</cite><blockquote><div><p>Utiliser bc pourquoi pas, mon idée était cependant que j&#039;utilise déjà numpy à la base alors pourquoi installer des trucs en plus</p></div></blockquote></div><p>bc n&#039;est pas un &quot;truc en plus&quot;. Ce logiciel installé par défaut sur Ubuntu. <img src="http://forum.ubuntu-fr.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[dummy@example.com (tiramiseb)]]></author>
			<pubDate>Wed, 23 Jan 2013 12:43:56 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=12313721#p12313721</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Astuce] Calculatrice Numpy dans Python dans un Terminal [Résolu]]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=12313691#p12313691</link>
			<description><![CDATA[<p>pingouinux: Mais t&#039;es chiant ! Même dans mes conversations à moi tu réponds plus vite que moi ! <img src="http://forum.ubuntu-fr.org/img/smilies/lol.png" width="15" height="15" alt="lol" /></p><p>Maisondouf : toi aussi t&#039;es chiant d&#039;ailleurs. Moi j&#039;vais aller bouder. Na !<br />(bon en vrai je vais surtout un peu travailler...)</p>]]></description>
			<author><![CDATA[dummy@example.com (tiramiseb)]]></author>
			<pubDate>Wed, 23 Jan 2013 12:42:02 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=12313691#p12313691</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Astuce] Calculatrice Numpy dans Python dans un Terminal [Résolu]]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=12313671#p12313671</link>
			<description><![CDATA[<p>Ou alors tu peux faire la chose suivante :</p><div class="codebox"><pre><code>gnome-terminal --title=Numpy -e &quot;python -ic &#039;from numpy import *&#039;&quot;</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (tiramiseb)]]></author>
			<pubDate>Wed, 23 Jan 2013 12:41:28 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=12313671#p12313671</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Astuce] Calculatrice Numpy dans Python dans un Terminal [Résolu]]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=12313601#p12313601</link>
			<description><![CDATA[<div class="quotebox"><blockquote><div><p>Le problème, c&#039;est qu&#039;il y a deux guillemets d&#039;ouverture mais le système prend le deuxième guillemet comme fermeture du premier, et j&#039;obtiens un message d&#039;erreur : &quot;numpy : option inconnue&quot;.</p></div></blockquote></div><p>Tu n&#039;as pas mis les backslashes que j&#039;ai placés pour échapper les guillemets de la commande python...</p><p>gnome-terminal --title=Numpy -e &quot;python -i -c <strong><span style="color: #ff0000">\&quot;</span></strong>from numpy import *; print &#039;Numpy loaded&#039; <strong><span style="color: #ff0000">\&quot;</span></strong>&quot;</p><p>(désolé je n&#039;ai pas mis les balises &quot;code&quot;, c&#039;est pour pouvoir mettre en gras et rouge...)</p>]]></description>
			<author><![CDATA[dummy@example.com (tiramiseb)]]></author>
			<pubDate>Wed, 23 Jan 2013 12:40:02 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=12313601#p12313601</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Astuce] Calculatrice Numpy dans Python dans un Terminal [Résolu]]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=12313591#p12313591</link>
			<description><![CDATA[<p>Bonjour,<br />Ta commande en #4 est différente de celle que te propose tiramiseb en #3. Il manque des <strong>\</strong> devant des <strong>&quot;</strong>.</p>]]></description>
			<author><![CDATA[dummy@example.com (pingouinux)]]></author>
			<pubDate>Wed, 23 Jan 2013 12:39:46 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=12313591#p12313591</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Astuce] Calculatrice Numpy dans Python dans un Terminal [Résolu]]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=12313571#p12313571</link>
			<description><![CDATA[<p>Essayes ça, sans garantie....</p><div class="codebox"><pre><code>gnome-terminal --title=Numpy -e &quot;python -i -c \&quot;from numpy import *; print &#039;Numpy loaded&#039; \&quot; &quot;</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (Maisondouf)]]></author>
			<pubDate>Wed, 23 Jan 2013 12:38:31 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=12313571#p12313571</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Astuce] Calculatrice Numpy dans Python dans un Terminal [Résolu]]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=12313531#p12313531</link>
			<description><![CDATA[<p>Merci beaucoup pour vos réponses, je ne suis pas sous gnome mais je vois le truc.<br />J&#039;essaie de lancer la commande suivante :</p><div class="codebox"><pre><code>terminal --title=Numpy -e &quot;python -i -c &quot;from numpy import *; print &#039;Numpy loaded&#039; &quot; &quot;</code></pre></div><p>Le problème, c&#039;est qu&#039;il y a deux guillemets d&#039;ouverture mais le système prend le deuxième guillemet comme fermeture du premier, et j&#039;obtiens un message d&#039;erreur : &quot;numpy : option inconnue&quot;.<br />Par contre j&#039;obtiens bien python et numpy chargés en ouvrant un terminal et en tapant :</p><div class="codebox"><pre><code>python -i -c &quot;from numpy import *; print &#039;Numpy loaded&#039; &quot;</code></pre></div><p>ou j&#039;obtiens bien un terminal avec &quot;Numpy&quot; en titre et python chargé en tapant :</p><div class="codebox"><pre><code>terminal --title=Numpy -e &quot;python -i&quot;</code></pre></div><p>Mais je ne peux toujours pas avoir Terminal+python+numpy en même temps, à cause du problème des guillemets<br />Donc je peux passer de trois à deux fichiers, si je pouvais résoudre le problème des guillemets je pourrais effectivement passer à un seul fichier.</p><p>Utiliser bc pourquoi pas, mon idée était cependant que j&#039;utilise déjà numpy à la base alors pourquoi installer des trucs en plus si je peux me démerder en faisant simplement une ligne de commande en script.<br />Et puis c&#039;est toujours intéressant pour l&#039;utilisation des scripts, si je réussis a faire ça ça pourra me servir à autre chose plus tard, ou peut-être même à un lecteur du topic !</p>]]></description>
			<author><![CDATA[dummy@example.com (goyou)]]></author>
			<pubDate>Wed, 23 Jan 2013 12:34:32 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=12313531#p12313531</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Astuce] Calculatrice Numpy dans Python dans un Terminal [Résolu]]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=12311501#p12311501</link>
			<description><![CDATA[<p>Pour simplifier encore :</p><p>Remplace ta ligne exec par ça:</p><div class="codebox"><pre><code>gnome-terminal -t Numpy -e &quot;python -ic \&quot;from numpy import *; print &#039;Numpy loaded&#039;\&quot;&quot;</code></pre></div><p>...et passe &quot;Terminal=true&quot; à &quot;Terminal=false&quot; (sinon il va utiliser un terminal pour te lancer gnome-terminal, ce qui est plutôt con <img src="http://forum.ubuntu-fr.org/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /></p><p>(et là tu peux supprimer calcupy.sh et calcupy.py).</p><br /><p>PS: pourquoi n&#039;utilises-tu pas bc ?</p><div class="codebox"><pre><code>$ bc -l
bc 1.06.95
Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty&#039;. 
e(1)
2.71828182845904523536
4^3
64
(45+66)*2^14+e(18)
67478593.13733051113878650325</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (tiramiseb)]]></author>
			<pubDate>Wed, 23 Jan 2013 09:58:27 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=12311501#p12311501</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  [Astuce] Calculatrice Numpy dans Python dans un Terminal [Résolu]]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=12308241#p12308241</link>
			<description><![CDATA[<p>Déjà ça serait bien de mettre tes fichiers python ailleurs que sur la racine du système....<br />Ensuite pour lancer un terminal qui lance python qui lance numpy, tout ça se fait dans le lanceur &quot;/usr/share/applications/calcupy.desktop&quot; que tu as crée.<br />Remplace ta ligne exec par ça:</p><div class="codebox"><pre><code>gnome-terminal -t Numpy -e &quot;python -i /&lt;quelque-part&gt;/calcupy.py&quot;</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (Maisondouf)]]></author>
			<pubDate>Tue, 22 Jan 2013 22:16:42 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=12308241#p12308241</guid>
		</item>
	</channel>
</rss>
