Menu

#26 Many PySolFC modules cannot be loaded on their own

open
nobody
None
5
2012-11-25
2012-11-25
Shlomi Fish
No

Hi,

many of PySolFC's modules cannot be imported on their own without first importing other PySolFC modules or doing other kinds of evil black magic. This makes reusing PySolFC's code from other code much harder. Please make its modules as self-contained and as individually loadable as possible, because this is part of the Python philosophy:

* rindolf is close to giving up on PySolFC's code.
<rindolf> Isn't the purpose of a Python module is to be loadable as it is?
<nedbat> rindolf: yes, but some are better at that than others...
<rindolf> nedbat: yes.
<rindolf> A non-modular module... ;-)
<rindolf> nedbat: oh well, I'll report it as a bug.
<rindolf> nedbat: and maybe create a branch to fix it.

Regards,

-- Shlomi Fish

Discussion

  • Shlomi Fish

    Shlomi Fish - 2012-11-25

    Hi all,

    OK, I implemented it with some tests (see "make test"), see:

    https://github.com/shlomif/PySolFC/tree/pysolfc_modules_modularization

    I'm going to attach a patch soon.

    Regards,

    -- Shlomi Fish

     
  • Shlomi Fish

    Shlomi Fish - 2012-11-25

    Patch to make sure every module can be loaded individually.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.