[issue24680] typo in documentation, section extending python

2015-07-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 91b738cfdc2f by Zachary Ware in branch '2.7': Issue #24680: Remove random backslash. Patch by cdz. https://hg.python.org/cpython/rev/91b738cfdc2f New changeset cf0011b6ebbd by Zachary Ware in branch '3.4': Issue #24680: Remove random backslash.

[issue24680] typo in documentation, section extending python

2015-07-21 Thread cdz
: extending_doc_typo.diff keywords: patch messages: 247080 nosy: cdz, docs@python priority: normal severity: normal status: open title: typo in documentation, section extending python type: enhancement versions: Python 3.6 Added file: http://bugs.python.org/file39971/extending_doc_typo.diff

[issue24680] typo in documentation, section extending python

2015-07-21 Thread Martin Panter
Martin Panter added the comment: Nice and obvious fix, looks like it also applies to Python 2. -- nosy: +vadmium stage: - commit review versions: +Python 2.7, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org

[issue24680] typo in documentation, section extending python

2015-07-21 Thread Zachary Ware
Zachary Ware added the comment: Fixed! Thanks for the report and patch, cdz, and thanks for the triage, Martin. -- nosy: +zach.ware ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24680 ___

[issue16467] frozen importlib required for extending Python interpreter not public

2012-11-29 Thread Jesús Cea Avión
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16467 ___ ___ Python-bugs-list mailing list

[issue16467] frozen importlib required for extending Python interpreter not public

2012-11-13 Thread Anthony Tuininga
: atuining priority: normal severity: normal status: open title: frozen importlib required for extending Python interpreter not public type: behavior versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16467

[issue16467] frozen importlib required for extending Python interpreter not public

2012-11-13 Thread R. David Murray
R. David Murray added the comment: The file certainly exists, since Python requires it to run. It sounds like cx_Freeze just doesn't support Python3.3 yet. I don't see that this is a Python bug. -- nosy: +r.david.murray ___ Python tracker

[issue16467] frozen importlib required for extending Python interpreter not public

2012-11-13 Thread Anthony Tuininga
Anthony Tuininga added the comment: The file importlib.h is used when building the Python interpreter but it is *not* available in a standard (non-source) distribution of Python. I have copied the file from a source distribution of Python and that does in fact work, but I don`t want to make

[issue16467] frozen importlib required for extending Python interpreter not public

2012-11-13 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: I tried to remove all references to #include importlib.h and _Py_M__importlib, and added the lines in _AddBaseModules(): self.AddAlias(_frozen_importlib, importlib._bootstrap) self.IncludeModule(_frozen_importlib) Even if it's not optimal (the

[issue16467] frozen importlib required for extending Python interpreter not public

2012-11-13 Thread Thomas Kluyver
Changes by Thomas Kluyver tak...@gmail.com: -- nosy: +takluyver ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16467 ___ ___ Python-bugs-list

[issue16467] frozen importlib required for extending Python interpreter not public

2012-11-13 Thread Eric Snow
Changes by Eric Snow ericsnowcurren...@gmail.com: -- nosy: +brett.cannon, eric.snow ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16467 ___ ___

[issue16467] frozen importlib required for extending Python interpreter not public

2012-11-13 Thread Anthony Tuininga
Anthony Tuininga added the comment: Thanks to Amaury for his suggestion. It resolves the problem completely and answers the question I had about how to proceed. For others who may come across this, the key was to generate the importlib._bootstrap module (which is what is found in importlib.h)

[issue15656] Extending Python with C page needs update for 3.x

2012-08-15 Thread Eli Bendersky
Changes by Eli Bendersky eli...@gmail.com: -- nosy: +eli.bendersky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15656 ___ ___ Python-bugs-list

[issue15656] Extending Python with C page needs update for 3.x

2012-08-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset 599376deeeac by Eli Bendersky in branch '3.2': Issue #15656: fixing code sample in extending doc http://hg.python.org/cpython/rev/599376deeeac -- nosy: +python-dev ___ Python tracker

[issue15656] Extending Python with C page needs update for 3.x

2012-08-15 Thread Eli Bendersky
Eli Bendersky added the comment: Fixed, thanks for the report. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15656 ___

[issue15656] Extending Python with C page needs update for 3.x

2012-08-15 Thread Jesús Cea Avión
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15656 ___ ___ Python-bugs-list mailing list

[issue15656] Extending Python with C page needs update for 3.x

2012-08-15 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: Should this be applied to default (3.3) too? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15656 ___ ___

[issue15656] Extending Python with C page needs update for 3.x

2012-08-15 Thread Sandro Tosi
Sandro Tosi added the comment: It's fixed in default too: http://hg.python.org/cpython/rev/f46b4b7b817c It was not shown because the commit message misses the issue reference. -- ___ Python tracker rep...@bugs.python.org

[issue15656] Extending Python with C page needs update for 3.x

2012-08-14 Thread Sandro Tosi
: normal stage: patch review status: open title: Extending Python with C page needs update for 3.x versions: Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue15656

Re: Slices when extending python with C++

2011-12-28 Thread Robert Kern
On 12/27/11 11:02 PM, roze...@volny.cz wrote: Hallo, I have kind of special question when extening python with C++ implemented modules. I try to implement a class, behaving also like an array. And I need to implement slice-getters. I implemented PySequenceMethods.sq_slice to get simple slices

Re: Slices when extending python with C++

2011-12-28 Thread rozelak
? Or in another way? Thank you very much again. Regards, Dan - PŮVODNÍ ZPRÁVA - Od: Robert Kern robert.k...@gmail.com Komu: python-list@python.org Předmět: Re: Slices when extending python with C++ Datum: 28.12.2011 - 10:24:42 On 12/27/11 11:02 PM, roze...@volny.cz wrote: Hallo, I have kind

Re: Slices when extending python with C++

2011-12-28 Thread Robert Kern
On 12/28/11 1:01 PM, roze...@volny.cz wrote: Dear Robert, thank you very much for your answer. I understand what you mean and I have looked at slice object and C-api methods it provides. It should be easy to implement it. The only question is how exactly yo implement the general getter, since

Re: Slices when extending python with C++

2011-12-28 Thread rozelak
Great, it's working! Thank you very much, Robert! Dan T. - PŮVODNÍ ZPRÁVA - Od: Robert Kern robert.k...@gmail.com Komu: python-list@python.org Předmět: Re: Slices when extending python with C++ Datum: 28.12.2011 - 14:18:36 On 12/28/11 1:01 PM, roze...@volny.cz wrote: Dear Robert

Slices when extending python with C++

2011-12-27 Thread rozelak
Hallo, I have kind of special question when extening python with C++ implemented modules. I try to implement a class, behaving also like an array. And I need to implement slice-getters. I implemented PySequenceMethods.sq_slice to get simple slices like: myobj[x:y] It works perfectly, without

Slices when extending python with C++

2011-12-27 Thread rozelak
Hallo, I have kind of special question when extening python with C++ implemented modules. I try to implement a class, behaving also like an array. And I need to implement slice-getters. I implemented PySequenceMethods.sq_slice to get simple slices like: myobj[x:y] It works perfectly, without

Re: Slices when extending python with C++

2011-12-27 Thread Ian Kelly
2011/12/27 roze...@volny.cz: Hallo, I have kind of special question when extening python with C++ implemented modules. I try to implement a class, behaving also like an array. And I need to implement slice-getters. I implemented PySequenceMethods.sq_slice to get simple slices like:

Re: Exception Handling (C - extending python)

2011-10-25 Thread Ulrich Eckhardt
Am 23.10.2011 14:41, schrieb Stefan Behnel: That's just fine. If you are interested in the inner mechanics of the CPython runtime, reading the source is a very good way to start getting involved with the project. However, many extension module authors don't care about these inner mechanics and

Re: Exception Handling (C - extending python)

2011-10-25 Thread Stefan Behnel
Ulrich Eckhardt, 25.10.2011 08:49: Am 23.10.2011 14:41, schrieb Stefan Behnel: That's just fine. If you are interested in the inner mechanics of the CPython runtime, reading the source is a very good way to start getting involved with the project. However, many extension module authors don't

Re: Exception Handling (C - extending python)

2011-10-23 Thread Stefan Behnel
Lee, 23.10.2011 06:09: Where does PyExc_TypeError (and alike) points to? I can see its declaration - PyAPI_DATA(PyObject *) PyExc_TypeError; - in pyerrors.h but I cannot figure out what it is its value, where it is initialized. It gets initialised inside of the interpreter core and then points

Re: Exception Handling (C - extending python)

2011-10-23 Thread Lee
Thanks Stefan, I am just interested to understand the mechanism inside python. If it points to an object that means I can defered it (through ob_type). From there, how a function like PyErr_SetString knows what exception is? Where its value is kept? Lee On Oct 23, 10:06 pm, Stefan Behnel

Re: Exception Handling (C - extending python)

2011-10-23 Thread Christian Heimes
Am 23.10.2011 06:09, schrieb Lee: Hi all, Where does PyExc_TypeError (and alike) points to? I can see its declaration - PyAPI_DATA(PyObject *) PyExc_TypeError; - in pyerrors.h but I cannot figure out what it is its value, where it is initialized. It's initialized in Objects/exceptions.c

Re: Exception Handling (C - extending python)

2011-10-23 Thread Stefan Behnel
Hi, note that I reformatted your posting to get the replies back into order. Lee, 23.10.2011 13:32: On Oct 23, 10:06 pm, Stefan Behnel wrote: Lee, 23.10.2011 06:09: Where does PyExc_TypeError (and alike) points to? I can see its declaration - PyAPI_DATA(PyObject *) PyExc_TypeError; - in

Re: Exception Handling (C - extending python)

2011-10-23 Thread Lee
For a moment, back to the basics... I am using the example provided by docs at 2.1.2 Providing finer control Using say: mynoddy = noddy2.Noddy() mynoddy.first = a mynoddy.last = 0 the last line causes an ugly crash (on python 2.6.5 on winxp). No way to catch the exception. As I understand

Exception Handling (C - extending python)

2011-10-22 Thread Lee
Hi all, Where does PyExc_TypeError (and alike) points to? I can see its declaration - PyAPI_DATA(PyObject *) PyExc_TypeError; - in pyerrors.h but I cannot figure out what it is its value, where it is initialized. Any help is greatly appreciated. Lee --

[issue9037] Add explanation as to how to raise a custom exception in the extending python intermezzo on exceptions

2010-08-02 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Added in r83563. Thanks! -- nosy: +georg.brandl resolution: - accepted status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9037

[issue9037] Add explanation as to how to raise a custom exception in the extending python intermezzo on exceptions

2010-06-20 Thread Jonathan G. Underwood
New submission from Jonathan G. Underwood jonathan.underw...@gmail.com: In the documentation section on Extending Python with C or C++ there is an Intermezzo on Errors and Exceptions which shows how to create a custom exception in an extension module. I was just following these instructions

[issue6446] import_spam() in extending python can fail without setting the error.

2009-07-11 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Thanks, fixed in r73938. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6446 ___

[issue6446] import_spam() in extending python can fail without setting the error.

2009-07-09 Thread Julian Andres Klode
to handle it. -- assignee: georg.brandl components: Documentation messages: 90325 nosy: georg.brandl, jak severity: normal status: open title: import_spam() in extending python can fail without setting the error. type: crash versions: Python 2.6 ___ Python

ANN: Course on Optimizing and Extending Python

2009-04-27 Thread Mike Müller
Python Academy is offering the course Optimizing and Extending Python with Other Languages on May 16 and 17, 2009 in Leipzig, Germany. The course is designed for Python programmers who want to make their the programs more efficient and/or like to include libraries written in languages other

Re: Extending Python Questions .....

2009-02-26 Thread Nick Craig-Wood
Ben bnsili...@gmail.com wrote: On Feb 24, 11:31?am, Nick Craig-Wood n...@craig-wood.com wrote: So do you want to embed python into your code? I'm still not clear what you are trying to achieve with python, though I have a better idea what SLAG is now! Actually no, I want to EXTEND

Re: Extending Python Questions .....

2009-02-25 Thread Ben
On Feb 24, 11:31 am, Nick Craig-Wood n...@craig-wood.com wrote: Ben bnsili...@gmail.com wrote:  No, It uses the the S-lang for video, and input control. However, SLAG  is more of an abstract layer on top of that.  It has a Structures that contains menus and screens (menumodule /  

Re: Extending Python Questions .....

2009-02-24 Thread Ben
On Feb 23, 2:31 pm, Nick Craig-Wood n...@craig-wood.com wrote: Ben bnsili...@gmail.com wrote:  In My S-Lag Project called, SLAG, I have some function keys that get  mapped back to S-lang internal functions.  My SLAG project works pretty much like Python (as does the S-Lang).  You write a

Re: Extending Python Questions .....

2009-02-24 Thread Nick Craig-Wood
Ben bnsili...@gmail.com wrote: No, It uses the the S-lang for video, and input control. However, SLAG is more of an abstract layer on top of that. It has a Structures that contains menus and screens (menumodule / screenmodule). One LOADS them up with parameters. such as creating a new

Re: Extending Python Questions .....

2009-02-24 Thread Mike Driscoll
On Feb 24, 11:31 am, Nick Craig-Wood n...@craig-wood.com wrote: Ben bnsili...@gmail.com wrote:  No, It uses the the S-lang for video, and input control. However, SLAG  is more of an abstract layer on top of that.  It has a Structures that contains menus and screens (menumodule /  

Extending Python Questions .....

2009-02-23 Thread Ben
Ok... Now I can start asking. In My S-Lag Project called, SLAG, I have some function keys that get mapped back to S-lang internal functions. My SLAG project works pretty much like Python (as does the S-Lang). You write a S-lang script that imports your extension. module - and all this gets run

Re: Extending Python Questions .....

2009-02-23 Thread Diez B. Roggisch
Ben schrieb: Ok... Now I can start asking. In My S-Lag Project called, SLAG, I have some function keys that get mapped back to S-lang internal functions. My SLAG project works pretty much like Python (as does the S-Lang). You write a S-lang script that imports your extension. module - and all

Re: Extending Python Questions .....

2009-02-23 Thread Nick Craig-Wood
Ben bnsili...@gmail.com wrote: In My S-Lag Project called, SLAG, I have some function keys that get mapped back to S-lang internal functions. My SLAG project works pretty much like Python (as does the S-Lang). You write a S-lang script that imports your extension. module - and all this

Re: Extending Python with C or C++

2009-01-09 Thread Nick Craig-Wood
Thomas Heller thel...@python.net wrote: Nick Craig-Wood schrieb: Thomas Heller thel...@python.net wrote: Nick Craig-Wood schrieb: Interesting - I didn't know about h2xml and xml2py before and I've done lots of ctypes wrapping! Something to help with the initial drudge work of

Re: Extending Python with C or C++

2009-01-08 Thread Thomas Heller
Nick Craig-Wood schrieb: Thomas Heller thel...@python.net wrote: Nick Craig-Wood schrieb: Interesting - I didn't know about h2xml and xml2py before and I've done lots of ctypes wrapping! Something to help with the initial drudge work of converting the structures would be very helpful.

Re: Extending Python with C or C++

2009-01-07 Thread Thomas Heller
Nick Craig-Wood schrieb: Ralf Schoenian r...@schoenian-online.de wrote: Ryan wrote: I've been using Python for many years now. It's a wonderful language that I enjoy using everyday. I'm now interested in getting to know more about the guts (C/C++) and extending it. But, extending python

Re: Extending Python with C or C++

2009-01-07 Thread Nick Craig-Wood
Thomas Heller thel...@python.net wrote: Nick Craig-Wood schrieb: Interesting - I didn't know about h2xml and xml2py before and I've done lots of ctypes wrapping! Something to help with the initial drudge work of converting the structures would be very helpful. (

Re: Extending Python with C or C++

2009-01-06 Thread Stefan Behnel
Ryan wrote: 3. Extending CPython by connecting it to Python-oblivious code written in C with Ctypes (Ralf's suggestion is good for this) 4. Extending CPython by connecting it to Python-aware (and specific) code using the CPython C-API functions (http://docs.python.org/c-api/) For extending

Re: Extending Python with C or C++

2009-01-06 Thread Nick Craig-Wood
Ralf Schoenian r...@schoenian-online.de wrote: Ryan wrote: I've been using Python for many years now. It's a wonderful language that I enjoy using everyday. I'm now interested in getting to know more about the guts (C/C++) and extending it. But, extending python still seems like a black

Re: Extending Python with C or C++

2009-01-06 Thread sturlamolden
On Jan 5, 9:06 pm, Ryan heni...@yahoo.com wrote: I've been using Python for many years now. It's a wonderful language that I enjoy using everyday. I'm now interested in getting to know more about the guts (C/C++) and extending it. But, extending python still seems like a black art to me

Extending Python with C or C++

2009-01-05 Thread Ryan
I've been using Python for many years now. It's a wonderful language that I enjoy using everyday. I'm now interested in getting to know more about the guts (C/C++) and extending it. But, extending python still seems like a black art to me. Is there anymore docs or info on extending it besides

Re: Extending Python with C or C++

2009-01-05 Thread Ralf Schoenian
Ryan wrote: I've been using Python for many years now. It's a wonderful language that I enjoy using everyday. I'm now interested in getting to know more about the guts (C/C++) and extending it. But, extending python still seems like a black art to me. Is there anymore docs or info on extending

Re: Extending Python with C or C++

2009-01-05 Thread Terry Reedy
-expression syntax. (C/C++) and extending it. Now you are asking about CPython, the leading computer implementation. But, extending python still seems like a black art to me. Is there anymore docs or info on extending it besides the standard sparse ones (http://www.python.org/ doc/2.5.2/ext

Re: Extending Python with C or C++

2009-01-05 Thread Ryan
, namespaces (including modules), and the statement and infix-expression syntax. (C/C++) and extending it. Now you are asking about CPython, the leading computer implementation. But, extending python still seems like a black art to me. Is there anymore docs or info on extending it besides

[issue4611] Small error in Extending Python with C or C++

2008-12-15 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Thanks, fixed in r67785. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4611 ___

[issue4611] Small error in Extending Python with C or C++

2008-12-09 Thread Kuba Kończyk
: georg.brandl, jakamkon severity: normal status: open title: Small error in Extending Python with C or C++ versions: Python 2.6, Python 3.1 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4611

[issue4611] Small error in Extending Python with C or C++

2008-12-09 Thread Kuba Kończyk
Kuba Kończyk [EMAIL PROTECTED] added the comment: I meant owning. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4611 ___ ___ Python-bugs-list mailing list

embedding and extending python C API registering callback handler objects

2008-06-27 Thread Tim Spens
Hello all, I've been trying to get an example found here http://codeidol.com/python/python3/Embedding-Python/Registering-Callback-Handler-Objects/ to work. Every thing works fine except when I try to trigger an event from c that will call a python function. Here is my test code:

Re: embedding and extending python C API registering callback handler objects

2008-06-27 Thread Matimus
On Jun 27, 8:22 am, Tim Spens [EMAIL PROTECTED] wrote: Hello all, I've been trying to get an example found herehttp://codeidol.com/python/python3/Embedding-Python/Registering-Callb... to work.  Every thing works fine except when I try to trigger an event from c that will call a python

Re: embedding and extending python C API registering callback handler objects

2008-06-27 Thread Tim Spens
thanks, but didn't fix the problem. --- On Fri, 6/27/08, Matimus [EMAIL PROTECTED] wrote: From: Matimus [EMAIL PROTECTED] Subject: Re: embedding and extending python C API registering callback handler objects To: python-list@python.org Date: Friday, June 27, 2008, 9:03 AM On Jun 27, 8:22

Re: embedding and extending python C API registering callback handler objects

2008-06-27 Thread Tim Spens
--- On Fri, 6/27/08, Tim Spens [EMAIL PROTECTED] wrote: From: Tim Spens [EMAIL PROTECTED] Subject: Re: embedding and extending python C API registering callback handler objects To: python-list@python.org, Matimus [EMAIL PROTECTED] Date: Friday, June 27, 2008, 9:16 AM thanks, but didn't

Extending Python with C: Cannot find MPI library

2008-06-19 Thread Spectrum
I am writing some Python code using the Message Passing Interface (MPI), an API used in parallel computing. There exist a number of Python implementations of MPI, but apparently they all rely on the Numeric Python (numpy) package. I need to run my code on a particular machine made available by

Re: Extending Python with C: Cannot find MPI library

2008-06-19 Thread Jeroen Ruigrok van der Werven
-On [20080619 13:53], Spectrum ([EMAIL PROTECTED]) wrote: ImportError: /big/School/Cluster/Opgave03/ctest.so: undefined symbol: ompi_mpi_comm_world [EMAIL PROTECTED] Opgave03]$ Can anyone suggest anything? Can I get MPI to work in Python? Sounds like a typical case of not specifying any -L

Re: Extending Python with C: Cannot find MPI library

2008-06-19 Thread Spectrum
On Jun 19, 2:10 pm, Jeroen Ruigrok van der Werven [EMAIL PROTECTED] nomine.org wrote: -On [20080619 13:53], Spectrum ([EMAIL PROTECTED]) wrote:  ImportError: /big/School/Cluster/Opgave03/ctest.so: undefined symbol: ompi_mpi_comm_world [EMAIL PROTECTED] Opgave03]$  Can anyone suggest

Re: Extending Python with C: Cannot find MPI library

2008-06-19 Thread Jeroen Ruigrok van der Werven
-On [20080619 16:21], Spectrum ([EMAIL PROTECTED]) wrote: libmpi.so.0 = /usr/lib/openmpi/1.2.4-gcc/libmpi.so.0 (0x0042f000) libopen-rte.so.0 = /usr/lib/openmpi/1.2.4-gcc/libopen- rte.so.0 (0x003d4000) libopen-pal.so.0 = /usr/lib/openmpi/1.2.4-gcc/libopen- pal.so.0

Re: Extending Python with C: Cannot find MPI library

2008-06-19 Thread Spectrum
On Jun 19, 4:39 pm, Jeroen Ruigrok van der Werven [EMAIL PROTECTED] nomine.org wrote: -On [20080619 16:21], Spectrum ([EMAIL PROTECTED]) wrote:          libmpi.so.0 = /usr/lib/openmpi/1.2.4-gcc/libmpi.so.0 (0x0042f000)          libopen-rte.so.0 = /usr/lib/openmpi/1.2.4-gcc/libopen-

Re: Extending Python with C: Cannot find MPI library

2008-06-19 Thread Jeroen Ruigrok van der Werven
-On [20080619 17:11], Spectrum ([EMAIL PROTECTED]) wrote: ImportError: dynamic module does not define init function Might be it's looking, but not finding, something like crti.S or the likes, the C runtime files that specify stuff like _init and _fini. -- Jeroen Ruigrok van der Werven

Re: Extending Python with C: Cannot find MPI library

2008-06-19 Thread André Malo
* Jeroen Ruigrok van der Werven wrote: -On [20080619 17:11], Spectrum ([EMAIL PROTECTED]) wrote: ImportError: dynamic module does not define init function Might be it's looking, but not finding, something like crti.S or the likes, the C runtime files that specify stuff like _init and

Re: Extending Python with C: Cannot find MPI library

2008-06-19 Thread John Machin
On Jun 20, 5:56 am, Jeroen Ruigrok van der Werven [EMAIL PROTECTED] nomine.org wrote: -On [20080619 17:11], Spectrum ([EMAIL PROTECTED]) wrote: ImportError: dynamic module does not define init function Might be it's looking, but not finding, something like crti.S or the likes, the C

Extending Python with C: Can I specify another C compiler?

2008-06-04 Thread spectrumdt
Hello. I am trying to extend my Python program with some C code. This thread is sort of a follow-up to another thread of mine, linked below. I don't know what the conventions are in this newsgroup about creating new threads vs. staying in existing ones, but I figured I'd rather make a new

Re: Extending Python with C: Can I specify another C compiler?

2008-06-04 Thread Gerhard Häring
[EMAIL PROTECTED] wrote: Hello. I am trying to extend my Python program with some C code. [...] Anyway, my question is this: When compiling my C code to include in Python, using a Python script with the function distutils.core.setup... can I choose which C compiler to use? On my system it

Re: Extending Python with C: Can I specify another C compiler?

2008-06-04 Thread spectrumdt
On Jun 4, 6:25 pm, Gerhard Häring [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote:   Hello.   I am trying to extend my Python program with some C code. [...]   Anyway, my question is this: When compiling my C code to include in Python, using a Python script with the function

Re: Extending Python with C: Can I specify another C compiler?

2008-06-04 Thread Ivan Illarionov
On Wed, 04 Jun 2008 09:12:18 -0700, spectrumdt wrote: Hello. I am trying to extend my Python program with some C code. This thread is sort of a follow-up to another thread of mine, linked below. I don't know what the conventions are in this newsgroup about creating new threads vs.

Re: Extending Python with C: Can I specify another C compiler?

2008-06-04 Thread Ivan Illarionov
On Wed, 04 Jun 2008 09:12:18 -0700, spectrumdt wrote: Hello. I am trying to extend my Python program with some C code. This thread is sort of a follow-up to another thread of mine, linked below. I don't know what the conventions are in this newsgroup about creating new threads vs.

Re: Extending Python with C: Can I specify another C compiler?

2008-06-04 Thread Ivan Illarionov
On Wed, 04 Jun 2008 09:12:18 -0700, spectrumdt wrote: Hello. I am trying to extend my Python program with some C code. This thread is sort of a follow-up to another thread of mine, linked below. I don't know what the conventions are in this newsgroup about creating new threads vs.

Re: extending python with array functions

2008-02-05 Thread Gabriel Genellina
En Tue, 05 Feb 2008 05:28:33 -0200, Marc 'BlackJack' Rintsch [EMAIL PROTECTED] escribi�: On Mon, 04 Feb 2008 20:56:02 -0200, Gabriel Genellina wrote: - the array module http://docs.python.org/lib/module-array.html provides homogeneuos arrays that may be more efficient for your application.

Re: extending python with array functions

2008-02-05 Thread Janwillem
Gabriel Genellina wrote: En Tue, 05 Feb 2008 05:28:33 -0200, Marc 'BlackJack' Rintsch [EMAIL PROTECTED] escribi�: On Mon, 04 Feb 2008 20:56:02 -0200, Gabriel Genellina wrote: - the array module http://docs.python.org/lib/module-array.html provides homogeneuos arrays that may be more

Re: extending python with array functions

2008-02-04 Thread Gabriel Genellina
En Mon, 04 Feb 2008 18:44:42 -0200, Janwillem [EMAIL PROTECTED] escribió: I want to make numerical functions that can be called from python. I am programming in pascal the last few decades so I had a look at python for delphi (P4D). The demo09 gives as example add(a,b) using integers and

extending python with array functions

2008-02-04 Thread Janwillem
I want to make numerical functions that can be called from python. I am programming in pascal the last few decades so I had a look at python for delphi (P4D). The demo09 gives as example add(a,b) using integers and pyarg_parsetuple. That works! However, I cannot figure out what to do when a, b

Re: extending python with array functions

2008-02-04 Thread Marc 'BlackJack' Rintsch
On Mon, 04 Feb 2008 20:56:02 -0200, Gabriel Genellina wrote: - the array module http://docs.python.org/lib/module-array.html provides homogeneuos arrays that may be more efficient for your application. arrays don't have a special API, you have to import the module and use its functions

Re: extending Python - passing nested lists

2008-01-29 Thread Christian Meesters
Thanks. Point is that all such approaches would require lots(!) of calls to the Python API - a way by which I won't gain the desired speed. I've tried pyrex and the corresponding C-file is so convoluted with dummy variables, incrementing decrementing references, and other stuff, that I want to

Re: extending Python - passing nested lists

2008-01-29 Thread Christian Meesters
You didn't mention speed in your original post. Sorry, perhaps I considered this self-evident - which it is, of course, not. What about using array.array? Unless I am mistaken, these are just a thin wrapper around normal C arrays. The algorithm I want to implement requires several million

Re: extending Python - passing nested lists

2008-01-29 Thread Arnaud Delobelle
On Jan 29, 12:48 pm, Christian Meesters [EMAIL PROTECTED] wrote: Think, that I'm still at the wrong track. Point is that I cannot find any examples and don't know where to start here. Perhaps my problem boils down to two questions: I'd like to pass lists (in some cases nested ones) from Python

Re: extending Python - passing nested lists

2008-01-29 Thread Christian Meesters
Think, that I'm still at the wrong track. Point is that I cannot find any examples and don't know where to start here. Perhaps my problem boils down to two questions: I'd like to pass lists (in some cases nested ones) from Python to C and convert those Python-lists to C-arrays (e. g. of doubles).

Re: extending Python - passing nested lists

2008-01-29 Thread Arnaud Delobelle
On Jan 29, 1:22 pm, Christian Meesters [EMAIL PROTECTED] wrote: Thanks. Point is that all such approaches would require lots(!) of calls to the Python API - a way by which I won't gain the desired speed. You didn't mention speed in your original post. What about using array.array? Unless I am

Re: extending Python - passing nested lists

2008-01-29 Thread Mel
Christian Meesters wrote: You didn't mention speed in your original post. Sorry, perhaps I considered this self-evident - which it is, of course, not. What about using array.array? Unless I am mistaken, these are just a thin wrapper around normal C arrays. The algorithm I want to

Re: extending Python - passing nested lists

2008-01-29 Thread Arnaud Delobelle
On Jan 29, 4:00 pm, Christian Meesters [EMAIL PROTECTED] wrote: You didn't mention speed in your original post. Sorry, perhaps I considered this self-evident - which it is, of course, not. What about using array.array?  Unless I am mistaken, these are just a thin wrapper around normal C

Re: extending Python - passing nested lists

2008-01-28 Thread Christian Meesters
Mark Dickinson wrote: Well, it's pretty clear: you misspelt length as lenght. :) Well, that's not it ;-). (Damn copy paste plague ...) PySequence_Fast doesn't return an array: it returns a PyObject---in this case, a PyObject corresponding to a Python tuple. That's it. Thanks. Think I

Re: extending Python - passing nested lists

2008-01-28 Thread Mark Dickinson
On Jan 28, 10:10 am, Christian Meesters [EMAIL PROTECTED] wrote: Hi, I would like to write a C-extension function for an application of mine. For this I need to pass a nested list (like: [[a, b, c], [d, e, f], ...], where all letters are floats) to the C-function. Now, with the code I have

extending Python - passing nested lists

2008-01-28 Thread Christian Meesters
Hi, I would like to write a C-extension function for an application of mine. For this I need to pass a nested list (like: [[a, b, c], [d, e, f], ...], where all letters are floats) to the C-function. Now, with the code I have the compiler is complaining: subscripted value is neither array nor

Re: Extending Python with C API

2007-10-18 Thread Sami Vaisanen
On Thu, 13 Sep 2007 21:26:33 -0400, Carsten Haese wrote: On Thu, 2007-09-13 at 18:05 -0700, Thierry Masson wrote: Hello, I'm trying to use the C API to extend Python. I've looked at various books and web sites (including the docs at python.org) and I can't get any of the samples to work.

Re: Extending Python with C API

2007-09-13 Thread Carsten Haese
On Thu, 2007-09-13 at 18:05 -0700, Thierry Masson wrote: Hello, I'm trying to use the C API to extend Python. I've looked at various books and web sites (including the docs at python.org) and I can't get any of the samples to work. Below is a very minimalist example that I'm trying to get

Extending Python with C API

2007-09-13 Thread Thierry Masson
Hello, I'm trying to use the C API to extend Python. I've looked at various books and web sites (including the docs at python.org) and I can't get any of the samples to work. Below is a very minimalist example that I'm trying to get working and I was wondering if someone could tell me where I'm

Re: Extending Python with C API

2007-09-13 Thread Thierry Masson
On 9/13/07, Carsten Haese wrote: Your module C code uses an unknown function by the name of PyBuildValue. The actual name of the function you mean is Py_BuildValue. Thank you so much, Carsten. I can't believe I missed that underscore! I'm posting the working code below in case it ever turns out

Re: Extending Python by Adding Keywords Data types

2007-08-01 Thread Marc 'BlackJack' Rintsch
On Wed, 01 Aug 2007 01:42:38 +, Maximus Decimus wrote: Since, I am an amateur in using python, could you please be more specific. For new data types, you had asked to implement the classes. I intend to use C for implementing these data types. So where do i need to implement these classes

Re: Extending Python by Adding Keywords Data types

2007-08-01 Thread Bjoern Schliessmann
Maximus Decimus wrote: Since, I am an amateur in using python, http://en.wikipedia.org/wiki/Amateur | Most commonly an amateur is understood to be someone who does | something without pay or formal training. Conversely, a | professional is someone who has received training in a particular |

  1   2   3   >