Spyder and FORTRAN

1,776 views
Skip to first unread message

dcn

unread,
Nov 18, 2010, 12:46:44 AM11/18/10
to spyder
I was just trying out Spyder as an IDE for FORTRAN (Mac OS X 10.5.8).
First impressions are that it seems to work quite nicely. However, I
found three problems. The first of these has wider implications than
just for FORTRAN.

1. When I open a terminal window in the console (to run the FORTRAN
compiler), it does not execute the .bashrc or .profile path commands,
so Spyder cannot find my compiler without a full path statement.
Likewise, 'which' statements don't work. 'env' shows a collection of
settings, but it's not clear to me where it gets them from, and they
do not include the full path.

2. FORTRAN statements do not use the correct text colour unless there
are 5 or more spaces before the beginning of the statement - some of
the initial characters show as grey when there are four or less
spaces.

3. FORTRAN comments starting with 'c' color the syntax correctly, but
those with an initial '*' instead of 'c' do not. (Don't know when *
comments were allowed but they seem to work with the g95 compiler.)

DN

dcn

unread,
Nov 18, 2010, 5:28:48 AM11/18/10
to spyder
Re #1, I have found the answer: Spyder reads .bashrc but not .profile
When I included an extended path in .bashrc, it did show up in the
Spyder terminal window.

DN

dcn

unread,
Nov 18, 2010, 7:20:00 AM11/18/10
to spyder
Re #2, looks like Spyder is doing the orthodox thing and reporting
when not enough lead spaces before a statement. Tabs count as one
char in Spyder's editor. Some old code I was using (which did compile
in g95) was presumably written with a dodgy editor :-)

On Nov 18, 4:46 pm, dcn <d...@dcnicholls.com> wrote:
>

David

unread,
Nov 18, 2010, 5:26:12 PM11/18/10
to spyder
Just as a side note to these comments, I am using spyder as an editor
for fortran 90 files (which I then use f2py on), and have found it to
be quite satisfactory. I presume that all these comments relate to
fortran 77 code.

dcn

unread,
Nov 18, 2010, 6:35:20 PM11/18/10
to spyder
Yes, it was FORTRAN 77 code, and required a bit of work to get it to
work under g95 (not quite as bad as FORTRAN 4 would have been!)

Ariel Balter

unread,
Nov 18, 2010, 7:29:57 PM11/18/10
to spyd...@googlegroups.com
Great idea! I've used f2py a tiny bit. But being able to work with
both codes in the same place is a great feature.

--
Ariel Balter
arielbalter.com

"Don't believe everything you think."

Reply all
Reply to author
Forward
0 new messages