← Back to team overview

dolfin team mailing list archive

Import leak from assemble.py?

 

Hello!

Am I the only one that get import leak from assemble.py? 

In dolfin/__init__.py we do:

from assemble.py import *

and in assemble.py we do

from dolfin import *

My dolfin namespace still consists of more than 500 names.

I have attached a patch to assemble.py that fixes this on my system.

Cheers,

Johan
# HG changeset patch
# User hake@xxxxxxxxx
# Date 1207637322 -7200
# Node ID 451b2f0b97da8d9f77bdf309e7d4ec6efc9ca366
# Parent  d0e5c6d6bf02d47d2dce54110ec1df1c332d0f9a
Fixed a leak from dolfin.dolfin namespace

diff -r d0e5c6d6bf02 -r 451b2f0b97da site-packages/dolfin/assemble.py
--- a/site-packages/dolfin/assemble.py	Mon Apr 07 23:43:13 2008 +0200
+++ b/site-packages/dolfin/assemble.py	Tue Apr 08 08:48:42 2008 +0200
@@ -12,6 +12,14 @@ __date__ = "2007-08-15 -- 2008-02-11"
 __date__ = "2007-08-15 -- 2008-02-11"
 __copyright__ = "Copyright (C) 2007-2008 Anders Logg"
 __license__  = "GNU LGPL Version 2.1"
+
+__all__ = ["assemble",
+           "Function",
+           "FacetNormal",
+           "MeshSize",
+           "AvgMeshSize",
+           "LinearPDE",
+           "DirichletBC"]
 
 from ffc import *
 from dolfin import *

Follow ups