[pymvpa] InteractiveShell object

Abduljalil Sireis kentman234 at gmail.com
Tue Feb 26 16:44:01 UTC 2013


On Tue, Feb 26, 2013 at 11:32 AM, Yaroslav Halchenko
<debian at onerussian.com>wrote:

>
> On Tue, 26 Feb 2013, Abduljalil Sireis wrote:
>
> >    On Tue, Feb 26, 2013 at 11:15 AM, Yaroslav Halchenko
> >    <[1]debian at onerussian.com> wrote:
>
> >      On Tue, 26 Feb 2013, Abduljalil Sireis wrote:
>
> >      > � �1. I included all the script output
> >      eh -- you seems to be 1 line short of to provide a complete
> picture...
> >      how do you invoke this script? like
> >      ipython test.py
> >      ?
> >    i wrote in the terminal ./test.py�
>
> ah, ok
>
> what is the output of
>
> head ./test.py # in your shell
>
> then ?
>

*#!/usr/bin/env ipython*
*# -*- coding: utf-8 -*-*
*"""*
*Spyder Editor*
*
*
*This temporary script file is located here:*
*/home/brain/.spyder2/.temp.py*
*"""*



>
> >      what would happen if you just start ipython first and then while in
> >      interactive shell you type
> >      %run test.py
> >      ?
>
> >    i did, and got
> >    AttributeError: 'module' object has no attribute 'embed'
> >    WARNING: Failure executing file: <test.py>
>
> and nothing before that???
>

*/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*
*  "in 0.15", DeprecationWarning)*
*---------------------------------------------------------------------------
*
*AttributeError                            Traceback (most recent call last)
*
*
*
*/home/brain/ipython scripts/test.py in <module>()*
*     12 import mvpa2.suite as mvpa2*
*     13 import IPython*
*---> 14 IPython.embed()*
*     15 *
*     16 path = os.path.join('brain')*



>
> >    �what happens if you run it with pure python, not ipython, i.e.
> >      python test.py
> >      ?
> >    AttributeError: 'module' object has no attribute 'embed'
>
> so the same (thus not ipython-dependent), good
>
> >      > � �2. output of�print mvpa2.wtf()
> >      that should be ran in (i)python interpreter (e.g. just start
> ipython,
> >      and
> >      then type
> >      mvpa2.wtf()
> >      )
> >      > � �bash: syntax error near unexpected token `('
> >    �NameError: name 'mvpa2' is not defined
>
> ;) ok -- first enter
>
> import mvpa2
>

*i entered  import mvpa2.suite as mvpa2*
*
*
*shouldn't that be enough? :-) *

>
> in that ipython shell and only then 'print mvpa2.wtf()' -- if you need
> to use something from module X, you need to "import" it first -- abc of
> Python
>

*i see, thanks *

>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/attachments/20130226/cbdd11bf/attachment.html>


More information about the Pkg-ExpPsy-PyMVPA mailing list