[pymvpa] problems with running python scripts in terminal: IndentationError and No output

Meng Liang meng.liang at hotmail.co.uk
Wed Nov 17 14:27:10 UTC 2010

Dear Yaroslav,
I am really sorry to bother you with all these stupid questions - although I am getting to know much better the Python and PyMVPA, I still have some problems. 
Especially, I was wondering how people usually run the python script (.py file) in Debian. (By the way, I am using pymvpa on a NeuroDebian virtual machine and some problems occurred in Windows system now disappeared). I searched on the internet, and found someone recommended the following way:
type space dot space in the terminal and then drag and drop the py file from a graphical window to the terminal.
It worked quite well at the beginning. I tried the projections.py and smellit.py and I got the figures and no errors. But somehow, later when I tried this way again, it gives me the following error:=================>>>  . '/home/brain/Desktop/Host/MLiang/MRSpec/MVPA/TastePyMVPA/examples/smellit.py'   File "<stdin>", line 1    . '/home/brain/Desktop/Host/MLiang/MRSpec/MVPA/TastePyMVPA/examples/smellit.py'     ^IndentationError: unexpected indent=================I don't know what I changed which caused this error, but I didn't really change anything in the py file. I can still run the same py file without problem by double clicking the py file and choose 'Run in Terminal' or 'Run'. It only happens when I run it by 'drag and drop'. Any clue how this happens?
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!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/attachments/20101117/efe50781/attachment.htm>

More information about the Pkg-ExpPsy-PyMVPA mailing list