[pymvpa] problems with running python scripts in terminal: IndentationError and No output
meng.liang at hotmail.co.uk
Wed Nov 17 16:07:11 UTC 2010
Thanks very much for your quick reply! Now all the problem solved.
I actually tried "python file.py" way to execute the file before but the terminal was in the python mode (i.e., the terminal has become a python interpreter), so I failed. Once I quit the python in the terminal, python file.py worked! And the output message appears in the terminal window.
Regarding the "Could not save file" problem, I think it is a specific to gedit. I tried the same thing using GVim Text Editor or PsychoPy2 Coder (IDE) and no problem at all.
I am sure I will have more questions to bother you in the future, but as more and more problem solved, I am starting to like the system :-)
> Date: Wed, 17 Nov 2010 10:08:53 -0500
> From: debian at onerussian.com
> To: pkg-exppsy-pymvpa at lists.alioth.debian.org
> Subject: Re: [pymvpa] problems with running python scripts in terminal: IndentationError and No output
> Hi Meng,
> glad to see that NeuroDebian VM resolved your issues with software
> installations. now indeed it would have been great if we had some basic
> tutorial for newcommers on how to use Debian Linux -- we have plans for
> those but unfortunately lack of time.
> May be someone could help us out with them -- we would be grateful.
> Back to your specific questions:
> 1. running python script, I didn't even know drag/drop way...
> easiest -- just call it with python, i.e. in terminal type
> python file.py
> on how to "create" file.py -- the "problem" with linux is a
> variety, there is tons of nice editors and IDE environments to be used
> with Python. E.g. I use emacs + python-mode, then I just have my
> Python in an emacs subwindow and type Ctrl-C C to get it executed
> Some people use ipython directly and just call %edit file.py to
> modify/run the script
> some people use advanced IDEs creatde for or tailored toward Python:
> eclipse + pydev, pida, brian, etc
> psychopy guy has his own minimalistic IDE primarily for Psychopy's
> Python scripts, but you could edit/execute any other there as well
> needless to say that all those are available for you in NeuroDebian VM
> 2. just run python scripts in something with persistent window for
> output -- terminal directly, or some IDE which maintains "Output window"
> 3. not sure what was your problem with saving... may be you tried to
> save to the path where you have no permission for writing?
> hope this helps
> On Wed, 17 Nov 2010, Meng Liang wrote:
> > The second problem is about the example start-easy.py script. When I ran
> > this script, whatever option I chose ('Run in Terminal' or 'Run'), it gave
> > me nothing - it looks like the program was run but no output was given (or
> > maybe the new pop-up terminal window immediately closed after the program
> > was run so that I couldn't see any output even if there was any?). But if
> > I type the commands one by one into the terminal, everything is fine and
> > after the 'print' command, the output message appeared in the terminal.
> > How to solve this problem?
> > The third problem is about saving a py file. It should be a basic linux
> > question but I couldn't find a proper answer on the internet. I created a
> > new file named "test.py" and double clicked it. gedit automatically
> > lauched and opened the empty file. I wrote some python commands in the
> > file and click 'save'. But I got an error "Could not save the file...".
> > What did I do wrong?
> > Sorry for all these (probably very naive) questions and thanks very much
> > for your time!
> > Meng
> > _______________________________________________
> > Pkg-ExpPsy-PyMVPA mailing list
> > Pkg-ExpPsy-PyMVPA at lists.alioth.debian.org
> > http://lists.alioth.debian.org/mailman/listinfo/pkg-exppsy-pymvpa
> =------------------------------ /v\ ----------------------------=
> Keep in touch // \\ (yoh@|www.)onerussian.com
> Yaroslav Halchenko /( )\ ICQ#: 60653192
> Linux User ^^-^^ 
> Pkg-ExpPsy-PyMVPA mailing list
> Pkg-ExpPsy-PyMVPA at lists.alioth.debian.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pkg-ExpPsy-PyMVPA