From gjcarneiro at gmail.com Tue Sep 1 16:36:21 2009 From: gjcarneiro at gmail.com (Gustavo Carneiro) Date: Tue, 1 Sep 2009 15:36:21 +0100 Subject: [capi-sig] ANN: PyBindGen 0.12 released Message-ID: PyBindGen is a Python module that is geared to generating C/C++ code that binds a C/C++ library for Python. It does so without extensive use of either C++ templates or C pre-processor macros. It has modular handling of C/C++ types, and can be easily extended with Python plugins. The generated code is almost as clean as what a human programmer would write. It can be downloaded from: http://code.google.com/p/pybindgen/ Bug reports should be filed here: https://bugs.launchpad.net/pybindgen === pybindgen 0.12 === - Now we can catch C++ exceptions and translate them into Python - New API to add container iteration powers to wrapped C++ classes - Unary minus operator support (J. Michael Owen) - CppMethod: is_pure_virtual=True should imply is_virtual=True - More polish for numeric operators with non-class right operand - Virtual methods regressions fixed - gccxmlparser: don't try to wrap private/protected operators - MSVC compilation fix - unsigned long type handlers (J. Michael Owen) - tp_len/__len__ works now with overloaded methods (J. Michael Owen) - Add foreign_cpp_namespace option to Function wrappers - Misc. cleanup and bug fixes -- Gustavo J. A. M. Carneiro INESC Porto, Telecommunications and Multimedia Unit "The universe is always one step beyond logic." -- Frank Herbert From lanyjie at yahoo.com Sat Sep 5 07:05:55 2009 From: lanyjie at yahoo.com (Yingjie Lan) Date: Fri, 4 Sep 2009 22:05:55 -0700 (PDT) Subject: [capi-sig] expy 0.1.2 released! Message-ID: <968254.6051.qm@web54201.mail.re2.yahoo.com> Hi, This is to announce the release of expy 0.1.2 What's new? -------------- 1. allow both keywords and positional arguments to functions/methods. 2. allow wrapping up your returned value by yourself. (example is provided in tutorial) What is expy? -------------- expy is an expressway to extend Python! For more details on expy: http://expy.sf.net/ NOTE: if you can't find the latest version from sf, please go to the SVN, then you can download the tarball or check out. Thanks! Yingjie From lanyjie at yahoo.com Tue Sep 8 02:21:02 2009 From: lanyjie at yahoo.com (Yingjie Lan) Date: Mon, 7 Sep 2009 17:21:02 -0700 (PDT) Subject: [capi-sig] expy 0.1.3 released! In-Reply-To: <968254.6051.qm@web54201.mail.re2.yahoo.com> Message-ID: <823042.21769.qm@web54204.mail.re2.yahoo.com> Hi, This is to announce the release of expy 0.1.3 Now this release support class members/fields besides instance members/fields of extension types. What is expy? -------------- expy is an expressway to extend Python! For more details on expy: http://expy.sf.net/ Thanks! Yingjie From cloudage at gmail.com Sat Sep 12 06:55:38 2009 From: cloudage at gmail.com (cloudage at gmail.com) Date: Sat, 12 Sep 2009 12:55:38 +0800 Subject: [capi-sig] how to distribute a application which with python scriptting ability? Message-ID: <15cdd41b0909112155k4f256587qa7627e441036d9a1@mail.gmail.com> 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. From ulf.worsoe at mosek.com Sat Sep 12 13:24:16 2009 From: ulf.worsoe at mosek.com (Ulf Worsoe) Date: Sat, 12 Sep 2009 13:24:16 +0200 Subject: [capi-sig] how to distribute a application which with python scriptting ability? In-Reply-To: <15cdd41b0909112155k4f256587qa7627e441036d9a1@mail.gmail.com> References: <15cdd41b0909112155k4f256587qa7627e441036d9a1@mail.gmail.com> Message-ID: 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, 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 From cloudage at gmail.com Sun Sep 13 13:01:47 2009 From: cloudage at gmail.com (cloudage at gmail.com) Date: Sun, 13 Sep 2009 19:01:47 +0800 Subject: [capi-sig] capi-sig Digest, Vol 26, Issue 5 In-Reply-To: References: Message-ID: <15cdd41b0909130401q7e9ec5c9j2b54aea48099f0f@mail.gmail.com> 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 > 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 > To: capi-sig at python.org > Subject: Re: [capi-sig] how to distribute a application which with > python scriptting ability? > Message-ID: > > 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, 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 > *************************************** > From mal at egenix.com Sun Sep 13 17:16:39 2009 From: mal at egenix.com (M.-A. Lemburg) Date: Sun, 13 Sep 2009 17:16:39 +0200 Subject: [capi-sig] how to distribute a application which with python In-Reply-To: <15cdd41b0909130401q7e9ec5c9j2b54aea48099f0f@mail.gmail.com> References: <15cdd41b0909130401q7e9ec5c9j2b54aea48099f0f@mail.gmail.com> Message-ID: <4AAD0CD7.2070201@egenix.com> cloudage at gmail.com wrote: > 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... There are a certain number of modules that are needed before Python can run imports from ZIP files. You might want to look at how py2exe works to get an idea of what is needed and for the time being, you're probably better off with Python 2.6, since the number of available and working tools is far greater than for 3.1. > 2009/9/13 > >> 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..." When using list digests, please remember the above line... >> 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 >> To: capi-sig at python.org >> Subject: Re: [capi-sig] how to distribute a application which with >> python scriptting ability? >> Message-ID: >> >> 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, 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 >> *************************************** >> > _______________________________________________ > capi-sig mailing list > capi-sig at python.org > http://mail.python.org/mailman/listinfo/capi-sig -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Sep 13 2009) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try our new mxODBC.Connect Python Database Interface for free ! :::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ From jon at indelible.org Sun Sep 13 18:12:55 2009 From: jon at indelible.org (Jon Parise) Date: Sun, 13 Sep 2009 09:12:55 -0700 Subject: [capi-sig] capi-sig Digest, Vol 26, Issue 5 In-Reply-To: <15cdd41b0909130401q7e9ec5c9j2b54aea48099f0f@mail.gmail.com> References: <15cdd41b0909130401q7e9ec5c9j2b54aea48099f0f@mail.gmail.com> Message-ID: <1aff89d70909130912w982bb52p4e01001407155e8e@mail.gmail.com> On Sun, Sep 13, 2009 at 4:01 AM, wrote: > 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. The embedded interpreter is failing to find the standard Python libraries. You need to call Py_SetPythonHome() before calling Py_Initialize(). http://docs.python.org/3.1/c-api/init.html#Py_SetPythonHome -- Jon Parise (jon of indelible.org) :: "Scientia potentia est" From lanyjie at yahoo.com Tue Sep 22 03:22:37 2009 From: lanyjie at yahoo.com (Yingjie Lan) Date: Mon, 21 Sep 2009 18:22:37 -0700 (PDT) Subject: [capi-sig] expy 0.2 released! In-Reply-To: <823042.21769.qm@web54204.mail.re2.yahoo.com> Message-ID: <949698.64388.qm@web54202.mail.re2.yahoo.com> Hi, This is to announce the release of expy 0.2. What's new? ------------ 1. fixed the 'const char*' bug. 2. introduced the 'raw_type'. What is expy? -------------- expy is an expressway to extend Python! For more details, visit http://expy.sf.net/ Have a nice one! Yingjie