Great, it's working! Thank you very much, Robert!
Dan T.
- PŮVODNÍ ZPRÁVA -
Od: "Robert Kern"
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 R
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 s
another way?
Thank you very much again. Regards,
Dan
- PŮVODNÍ ZPRÁVA -
Od: "Robert Kern"
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,
> &g
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
2011/12/27 :
> 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]
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 p
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 p
Thomas Heller wrote:
> Nick Craig-Wood schrieb:
> > Thomas Heller 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 structur
Nick Craig-Wood schrieb:
> Thomas Heller 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.
>> >
>>
Thomas Heller 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.
> >
> > ( http://pypi.python.org/pypi/c
Nick Craig-Wood schrieb:
> Ralf Schoenian 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 see
On Jan 5, 9:06 pm, 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.
There are severa
Ralf Schoenian 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 art to me. Is th
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
On Jan 5, 2:37 pm, Terry Reedy 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
>
> The 'guts' of Python the language include the object model, namespaces
> (
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
The 'guts' of Python the language include the object model, namespaces
(including modules), and the statement and infix-expres
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 it
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 the s
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
* 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
-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 / asmo
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/libope
-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.
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
-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 an
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 my
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
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
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
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
[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
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 o
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
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
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
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 go
Hi All,
I am in the process also of trying to call Python script from a C++
windows app.
I have looked at the Boost site and am currently reading over the
Embedding portion of the tutorial. A question I have is that there
appear to be about 4 or 5 Boost items avaiable for download. Which one
should
Thanks for all the good pointers!
I am still reading throught them, but Boost seems to be the way to go!
Roman Yakovenko wrote:
> On 8 Aug 2006 02:28:31 -0700, Qun Cao <[EMAIL PROTECTED]> wrote:
> > Hi Everyone,
> >
> > I am a beginner on cross language development. My problem at hand is to
> > bu
Thanks Diez,
It is a good relief that I only need to wrap the classes I need. I
decide to try Boost first because it seems to have a wider audience
than SIP, but I would definately look into SIP if I want to do Qt
development in the future.
Diez B. Roggisch wrote:
> > Since the main program is s
Qun Cao wrote:
> Hi Everyone,
>
> I am a beginner on cross language development. My problem at hand is to
> build a python interface for a C++ application built on top of a 3D
> game engine. The purpose of this python interface is providing a
> convenient scripting toolkit for the application.
As
On 8 Aug 2006 02:28:31 -0700, Qun Cao <[EMAIL PROTECTED]> wrote:
> Hi Everyone,
>
> I am a beginner on cross language development. My problem at hand is to
> build a python interface for a C++ application built on top of a 3D
> game engine. The purpose of this python interface is providing a
> con
> Since the main program is still going to be the C++ application, I
> guess we need to embedding the python scripts in the C++ code. So at
> initialization stage, the python script needs to be loaded into the C++
> code. And this code can be simple, like
> player = Player()
> game.loadPlayer(pla
can write a python script like:
player = Player()
game.loadPlayer(player)
player.moveTo(location)
To configure the game environment.
I am trying to figure out how to make this happen. I only have the
vague idea that this concerns embedding/extending python with C
Unfortunately, I need to know a bit more than just the concept 'extern
"C"'. I am really slow at this. Can anyone point me towards some
examples or a tutorial (other than the one from python.org, I didn't
understand that one)?
Thanks,
Jeremy
--
http://mail.python.org/mailman/listinfo/python-lis
Brian van den Broek said unto the world upon 29/12/05 12:03 PM:
> jeremito said unto the world upon 29/12/05 11:39 AM:
>
>>I am learning how to extend Pythong with C++. I have will be writing
>>some code in C++ and want/need Python to interact with it. I am not
>>having success following the onl
jeremito wrote:
> Oops, sorry. My question is, how can I know if my Python interpreter
> was lined by C++?
Ah. This documentation fragment is somewhat wrong: it depends on the
target operating system and compiler whether you have to link main
with a C++ compiler. For many modern systems, this isn
Oops, sorry. My question is, how can I know if my Python interpreter
was lined by C++? The non-specific questions are, of course, does
anyone have any hints or suggestions? Good websites to visit?
Thanks,
Jeremy
--
http://mail.python.org/mailman/listinfo/python-list
jeremito said unto the world upon 29/12/05 11:39 AM:
> I am learning how to extend Pythong with C++. I have will be writing
> some code in C++ and want/need Python to interact with it. I am not
> having success following the online documentation from
> http://docs.python.org/ext/ext.html. I have
"jeremito" <[EMAIL PROTECTED]> wrote:
> I have one specific question. The documentation online states:
>
> "If the main program (the Python interpreter) is compiled and linked by
> the C compiler, global or static objects with constructors cannot be
> used. This is not a problem if the main progr
I am learning how to extend Pythong with C++. I have will be writing
some code in C++ and want/need Python to interact with it. I am not
having success following the online documentation from
http://docs.python.org/ext/ext.html. I have also looked briefly at
some of the demos in the source code
50 matches
Mail list logo