[f2py] Newbie question
Jean-Christophe Roche <roche-/[email protected]> Tue, 21 Jun 2011 19:17:09 +0200
| Newsgroups | gmane.comp.python.f2py.user |
|---|---|
| Message-ID | <[email protected]> |
Hi, I would like to extract a piece of code (a type, a subroutine, ...) from a Fortran file. I need to extract the code exactly as it is in the source file (with comments, blank lines, spaces, tabs, ...). I try to use the api.walk function but comments are not take into account. Then I try to work with the api.parse function with the option ignore_comments=False but I don't find how to get exactly the code as it is in the source file (stmt.item.line and stmt.item.strline are not exactly the original code). Thanks for any help, Jean-Christophe. -- Jean-Christophe Roche IRAM, Astronomy & Science Support group Institut de Radio Astronomie Millimetrique P: +33 (0) 47682 4967 F: +33 (0) 47651 5938 M: roche-/[email protected] C: [email protected] W: www.iram-institute.org/~roche