Dynamic module importing with McMillan installer

Discussion in 'Python' started by Sion Arrowsmith, Jun 16, 2004.

  1. We have an application which we distribute as a .exe as created
    with the McMillan installer, plus a suite of "plugins" which
    can also be run as standalone applications for internal use.
    The plugins work by freezing the standalone application and
    taking the out1.pyz, suitably renamed, and adding the new file
    name to sys.path at run time. We can then __import__ the module
    (or, specifically, the plugin interface from it). Which works
    fine, apart from one new plugin which works unfrozen, works as
    a frozen standalone, but when trying to import it frozen
    generates an ImportError from Installer/iu.py, "No module named
    <name>". It's using, as far as I can tell, the same commands to
    build the .pyz as a correctly functioning plugin module. Does
    anyone have the slightest clue what might be going wrong?
    (Python 2.3 on W2K, McMillan Installer 5 b5_5.)

    --
    \S -- -- http://www.chaos.org.uk/~sion/
    ___ | "Frankly I have no feelings towards penguins one way or the other"
    \X/ | -- Arthur C. Clarke
    her nu becomeþ se bera eadward ofdun hlæddre heafdes bæce bump bump bump
     
    Sion Arrowsmith, Jun 16, 2004
    #1
    1. Advertising

  2. Sion Arrowsmith <> wrote:
    > [ things not working ]


    Never mind, figured it out eventually. Problem was that the
    script for starting it off if standalone needs to explicitly
    import something from the module to get the module name into
    the .pyz .

    --
    \S -- -- http://www.chaos.org.uk/~sion/
    ___ | "Frankly I have no feelings towards penguins one way or the other"
    \X/ | -- Arthur C. Clarke
    her nu becomeþ se bera eadward ofdun hlæddre heafdes bæce bump bump bump
     
    Sion Arrowsmith, Jun 16, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Michael Peuser

    OpenGL with Mcmillan Installer?

    Michael Peuser, Aug 23, 2003, in forum: Python
    Replies:
    0
    Views:
    310
    Michael Peuser
    Aug 23, 2003
  2. Replies:
    0
    Views:
    304
  3. Harald Schneider
    Replies:
    1
    Views:
    2,344
    Harald Schneider
    Dec 1, 2003
  4. simo
    Replies:
    0
    Views:
    264
  5. Ajay Bakhshi
    Replies:
    1
    Views:
    306
Loading...

Share This Page