<br><br><div class="gmail_quote">On Tue, Feb 26, 2013 at 11:32 AM, Yaroslav Halchenko <span dir="ltr"><<a href="mailto:debian@onerussian.com" target="_blank">debian@onerussian.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
On Tue, 26 Feb 2013, Abduljalil Sireis wrote:<br>
<br>
</div><div class="im">>    On Tue, Feb 26, 2013 at 11:15 AM, Yaroslav Halchenko<br>
</div><div class="im">>    <[1]<a href="mailto:debian@onerussian.com">debian@onerussian.com</a>> wrote:<br>
<br>
>      On Tue, 26 Feb 2013, Abduljalil Sireis wrote:<br>
<br>
>      > � �1. I included all the script output<br>
>      eh -- you seems to be 1 line short of to provide a complete picture...<br>
>      how do you invoke this script? like<br>
>      ipython test.py<br>
>      ?<br>
</div>>    i wrote in the terminal ./test.py�<br>
<br>
ah, ok<br>
<br>
what is the output of<br>
<br>
head ./test.py # in your shell<br>
<br>
then ?<br></blockquote><div><br></div><div><b>#!/usr/bin/env ipython</b></div><div><b># -*- coding: utf-8 -*-</b></div><div><b>"""</b></div><div><b>Spyder Editor</b></div><div><b><br></b></div><div><b>This temporary script file is located here:</b></div>
<div><b>/home/brain/.spyder2/.temp.py</b></div><div><b>"""</b></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
>      what would happen if you just start ipython first and then while in<br>
>      interactive shell you type<br>
>      %run test.py<br>
>      ?<br>
<br>
>    i did, and got<br>
>    AttributeError: 'module' object has no attribute 'embed'<br>
>    WARNING: Failure executing file: <test.py><br>
<br>
</div>and nothing before that???<br></blockquote><div><br></div><div><b>/usr/lib/pymodules/python2.6/sklearn/linear_model/coordinate_descent.py:137: DeprecationWarning: rho was renamed to l1_ratio and will be removed in 0.15</b></div>
<div><b>  "in 0.15", DeprecationWarning)</b></div><div><b>---------------------------------------------------------------------------</b></div><div><b>AttributeError                            Traceback (most recent call last)</b></div>
<div><b><br></b></div><div><b>/home/brain/ipython scripts/test.py in <module>()</b></div><div><b>     12 import mvpa2.suite as mvpa2</b></div><div><b>     13 import IPython</b></div><div><b>---> 14 IPython.embed()</b></div>
<div><b>     15 </b></div><div><b>     16 path = os.path.join('brain')</b></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
>    �what happens if you run it with pure python, not ipython, i.e.<br>
<div class="im">>      python test.py<br>
>      ?<br>
>    AttributeError: 'module' object has no attribute 'embed'<br>
<br>
</div>so the same (thus not ipython-dependent), good<br>
<br>
>      > � �2. output of�print mvpa2.wtf()<br>
<div class="im">>      that should be ran in (i)python interpreter (e.g. just start ipython,<br>
>      and<br>
>      then type<br>
>      mvpa2.wtf()<br>
>      )<br>
>      > � �bash: syntax error near unexpected token `('<br>
>    �NameError: name 'mvpa2' is not defined<br>
<br>
</div>;) ok -- first enter<br>
<br>
import mvpa2<br></blockquote><div><br></div><div><b>i entered  import mvpa2.suite as mvpa2</b></div><div><b><br></b></div><div><b>shouldn't that be enough? :-) </b></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
in that ipython shell and only then 'print mvpa2.wtf()' -- if you need<br>
to use something from module X, you need to "import" it first -- abc of<br>
Python<br></blockquote><div><br></div><div><b>i see, thanks </b></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5"><br>
<br></div></div></blockquote></div>