fprettify icon indicating copy to clipboard operation
fprettify copied to clipboard

Run script

Open sindizzy opened this issue 2 years ago • 3 comments

So I installed the latest Python and installed fprettify package. All was installed successfully. Now when I go to the Python terminal prompt it says:

fprettify C:\Users\Dude\Documents\Code\CP.F90 File "", line 1 fprettify C:\Users\Duede\Documents\Code\CP.F90 ^ SyntaxError: invalid syntax

So not sure what I'm doing wrong.

sindizzy avatar Jan 17 '22 01:01 sindizzy

Are you on Windows? I think you need to launch fprettify from a command line, not from Python prompt.

danielhollas avatar Mar 16 '22 07:03 danielhollas

Yes in windows 10. I tried both.

sindizzy avatar Mar 17 '22 02:03 sindizzy

@sindizzy The path after following the fprettify command might be too long.*)

Enter the the directory containing the Fortran file(s) to process with the command line (use of cd), then apply the utility locally (e.g., fprettify test.f90 or fprettify *.f90) on the current folder's content. This omits potential complications by forward/backward slashes. If using fprettify with an installation by pip (thus PyPi) for your standard CPython (or the portable WinPython) still fails, there apparently is a port to conda/miniconda (repository). Testing the installation with a minimal Fortran program may draw a base line, too.

*) On occasion, I observed difficulties to direct a program's action on a file if that file was too many levels away/the path pointing to the file to process was too quirky. Though this experience refers to Linux Debian 12/bookworm (perhaps more importantly, not limited to fprettify), maybe there equally is a similar implicit threshold in Windows as the operation system.

minimal.f90.zip

nbehrnd avatar Mar 17 '22 08:03 nbehrnd