Minimal distro requirements for standalone python program....

Discussion in 'Python' started by jeuxal_com, Mar 1, 2004.

  1. jeuxal_com

    jeuxal_com Guest

    Hi,

    I need to add a python program (web updater+extras) with a window
    application.
    The same thing as the Online Lord of the Ring game lotrtcg.decipher.com.
    When you install their application, it create a subdirectory with very few
    python files*.dll,*.pyd,*.pyc.:

    _socket.pyd
    _sre.pyd
    _tkinter.pyd
    (laucher.pyc)
    (lotrotcglaucher.exe)
    python22.dll
    PyWinTypes22.dll
    tcl83.dll
    tk83.dll
    win32api.pyd
    xlib.pyd
    _MEI\...

    Context: I want to add some python capabilities to my application, but not
    force the user to install the full python distro.
    Questions:
    1- Are these files sufficient? (Too simple to be true!)
    2- Is their some registry/path entries do perform to setup a minimal
    python runtime?

    Other ideas, examples of how to do it in a simple way?

    Thanks
    AL
     
    jeuxal_com, Mar 1, 2004
    #1
    1. Advertising

  2. jeuxal_com

    Miki Tebeka Guest

    Hello AL,

    > Context: I want to add some python capabilities to my application, but not
    > force the user to install the full python distro.
    > Questions:
    > 1- Are these files sufficient? (Too simple to be true!)

    That depends on the application and which modules it uses. All of the
    installers (Installer, py2exe, cx_Freeze ...) will find all the modules
    a given script needs. IIRC they all use of one distutils features.

    > 2- Is their some registry/path entries do perform to setup a minimal
    > python runtime?

    Again, use one of the installers (py2exe seems to be popular). It will
    create a small executable with all the needed modules.

    HTH.
    Miki
     
    Miki Tebeka, Mar 2, 2004
    #2
    1. Advertising

  3. jeuxal_com wrote:
    > Context: I want to add some python capabilities to my application,
    > but not force the user to install the full python distro.
    > Questions:
    > 1- Are these files sufficient? (Too simple to be true!)


    As python can now inport from .zip, you could add the python files as a
    ..zip:
    - run compileall.py on <pythondir>/Lib to generate .pyc
    - pack all the files into python23.zip
    - if you install python23.zip into the same directory as the .exe, then I
    think the file will already be added to sys.path

    Hints:
    - specify a nonsense directory to the -d option of compileall.py. Otherwise,
    any backtraces will contain plausible filenames that do not exists on that
    machine
    - adding the .py files is optional
    - python will not import .pyd from the .zip file

    > 2- Is their some registry/path entries do perform to setup a
    > minimal python runtime?


    No, python will search for the files relative to the executable.

    Daniel
     
    Daniel Dittmar, Mar 2, 2004
    #3
    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. jeuxal_com
    Replies:
    2
    Views:
    477
    Paul McGuire
    Mar 1, 2004
  2. Tom Plunket
    Replies:
    1
    Views:
    262
    Tilde_karthik
    Dec 30, 2006
  3. azrael

    python linux distro

    azrael, Feb 8, 2007, in forum: Python
    Replies:
    10
    Views:
    700
    Szabolcs Nagy
    Feb 10, 2007
  4. Replies:
    5
    Views:
    274
    SPE - Stani's Python Editor
    Jun 2, 2007
  5. Replies:
    0
    Views:
    309
Loading...

Share This Page