[capi-sig] capi-sig Digest, Vol 26, Issue 5

cloudage at gmail.com cloudage at gmail.com
Sun Sep 13 13:01:47 CEST 2009


thanks for reply.
i already tried bring a python31.dll with my application,but when i copy
them to a computer without python installed,the initialization will fail,and
i got a error message as:

Fatal Python error: Py_Initialize: can't initialize sys standard streams
ImportError: No module named encodings.utf_8
This application has requested the Runtime to terminate it in an unusual
way.
Please contact the application's support team for more information.

i think maybe i have to take more than just a dll with my distribution...
and this is not so comfortable for a application which just want some python
scripting ability...

2009/9/13 <capi-sig-request at python.org>

> Send capi-sig mailing list submissions to
>        capi-sig at python.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        http://mail.python.org/mailman/listinfo/capi-sig
> or, via email, send a message with subject or body 'help' to
>        capi-sig-request at python.org
>
> You can reach the person managing the list at
>        capi-sig-owner at python.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of capi-sig digest..."
>
>
> Today's Topics:
>
>   1. Re: how to distribute a application which with python
>      scriptting ability? (Ulf Worsoe)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sat, 12 Sep 2009 13:24:16 +0200
> From: Ulf Worsoe <ulf.worsoe at mosek.com>
> To: capi-sig at python.org
> Subject: Re: [capi-sig] how to distribute a application which with
>        python  scriptting ability?
> Message-ID:
>        <c432a9980909120424q69bb4006r57a0caf87907b22a at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> I did something more or less like this recently, except I included the
> python.exe too.
> I think you could try the following: Put your executable and the
> python dll (python31.dll?) plus any .pyd you'll need in the same
> directory. Make a Python31.zip containing all necessary .py files (if
> you download the source, the whole .py library tree should be there -
> just zip it or as much of it you need).
>
>  When you initialize python from your application add the path of
> Python31.zip to sys.path (e.g.
> sys.path.append('c:\home\myname\mydistro\Python31.zip')).
>
> 1. Should be easy enough, you only need the dll for the raw
> interpreter, I think.
> 2. This is trickier; you'll probably have a hard time weeding out
> "dangerous functions"... several that might be considered so are
> included in the interpreter (e.g. basic IO or execfile). I don't know
> how you should do that.
>
> Regarding redistributable runtime: I think the license allows you to
> redistribute an unmodified python31.dll.
>
> /ulfw
>
> On Sat, Sep 12, 2009 at 6:55 AM,  <cloudage at gmail.com> wrote:
> > i use win32 and msvc9,i have installed the python3.1 on my computer,and
> > i played with it for several days.i also played the Boost.Python that
> enable
> > me easily export classes into python,but now when i want to distribute my
> > application to another computer without python installed,i `m confused.
> >
> > so plz consider an application which:
> >
> > 1. Exported some packages from itself to python and have a UI like a
> script
> > editor window that enable user type python script in and excute it.
> >
> > 2. Users can only use these packages supported by application it self to
> > maintain the application,they are limited to use the dangerous
> > default packages like io things provided by original python distribution.
> >
> > i thought there may be a python.dll that i just need take it with my
> > application,but seems i`m wrong,there isn`t ?such a file looks like a
> python
> > redistribute runtime.and about the question 2,the computer without python
> > installed can not have a python path that i should copy my pyd into.
> >
> > ?so how should i do these?i totally have no idea.
> > thanks for any help.
> > _______________________________________________
> > capi-sig mailing list
> > capi-sig at python.org
> > http://mail.python.org/mailman/listinfo/capi-sig
> >
>
>
>
> --
> Ulf Wors?e
> Mosek ApS
>
>
> ------------------------------
>
> _______________________________________________
> capi-sig mailing list
> capi-sig at python.org
> http://mail.python.org/mailman/listinfo/capi-sig
>
>
> End of capi-sig Digest, Vol 26, Issue 5
> ***************************************
>


More information about the capi-sig mailing list