fparser Reference Guide  0.0.14
fparser.two.utils.DynamicImport Class Reference

Static Public Member Functions

def import_now ()
 

Detailed Description

This class imports a set of fparser.two dependencies that can not
be imported during the Python Import time because they have a circular
dependency with this file.

They are imported once when the Fortran2003 is already processed by
calling the import_now() method.

The alternative is to have the equivalent top-level imports in the
Base.__new__ method, but this method is in the parser critical path and
is best to keep expensive operations out of it.

Definition at line 251 of file utils.py.

Member Function Documentation

◆ import_now()

def fparser.two.utils.DynamicImport.import_now ( )
static
Execute the Import of Fortran2003 dependencies.

Definition at line 265 of file utils.py.

265  def import_now():
266  """Execute the Import of Fortran2003 dependencies."""
267  # pylint: disable=import-outside-toplevel
268  from fparser.two.Fortran2003 import (
269  Else_If_Stmt,
270  Else_Stmt,
271  End_If_Stmt,
272  Masked_Elsewhere_Stmt,
273  Elsewhere_Stmt,
274  End_Where_Stmt,
275  Type_Guard_Stmt,
276  End_Select_Type_Stmt,
277  Case_Stmt,
278  End_Select_Stmt,
279  Comment,
280  Include_Stmt,
281  add_comments_includes_directives,
282  )
283  from fparser.two import C99Preprocessor
284 
285  DynamicImport.Else_If_Stmt = Else_If_Stmt
286  DynamicImport.Else_Stmt = Else_Stmt
287  DynamicImport.End_If_Stmt = End_If_Stmt
288  DynamicImport.Masked_Elsewhere_Stmt = Masked_Elsewhere_Stmt
289  DynamicImport.Elsewhere_Stmt = Elsewhere_Stmt
290  DynamicImport.End_Where_Stmt = End_Where_Stmt
291  DynamicImport.Type_Guard_Stmt = Type_Guard_Stmt
292  DynamicImport.End_Select_Type_Stmt = End_Select_Type_Stmt
293  DynamicImport.Case_Stmt = Case_Stmt
294  DynamicImport.End_Select_Stmt = End_Select_Stmt
295  DynamicImport.Comment = Comment
296  DynamicImport.Include_Stmt = Include_Stmt
297  DynamicImport.C99Preprocessor = C99Preprocessor
298  DynamicImport.add_comments_includes_directives = (
299  add_comments_includes_directives
300  )
301 
302 

The documentation for this class was generated from the following file: