Skip to content

where form saves log? #2

Open
Open

Description

@FeelUsM

I start form with f = form.open(keep_log=True), in text of program I write on statistics;, and then I found file xform01427.str near .ipynb file I run, but that file is void.
Where form saves log?

Activity

  1. tueda commented on Apr 13, 2021

    @tueda
    Owner

    As far as I remember, keep_log is the option to keep FORM's piped output (which could be in general gigantic) in memory, in order to show a proper error message when something wrong happens with FORM:

    The other argument ``keep_log`` indicates whether the log from FORM is
    kept and used as detailed information when an error occurs.
    If the value is >= 2, it specifies the maximum number of lines for
    the scrollback. The default value is False.

    So, this is not what you want.

    .str files are FORM's temporary files, used for storing big data that doesn't fit in memory, and will be deleted when FORM successfully exits.

    FORM has the -l option to save logs, but it writes the log into the directory where the main .frm file is sitting, not in the current directory. For example,

    import form
    
    with form.open("form -l") as f:
        f.write('''
            On stats;
            Auto V p;
            L F = g_(0,p1,...,p6);
            trace4,0;
            .sort
        ''')
        print(f.read('F'))
        print(f.read("`NAME_'"))

    writes the log to init.log in the directory which you can find by f.read("`NAME_'").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions