John McCardle wrote at 2023-1-25 22:31 -0500:
> ...
>1) To get the compiled Python to run independently, I have to hack
>LD_LIBRARY_PATH to get it to execute. `LD_LIBRARY_PATH=./Python-3.11.1
>./Python-3.11.1/python` .
The need to set `LD_LIBRARY_PATH` usually can be avoided via
a link time option
Greetings,
I'm working on embedding a Python interpreter into a C++ application. My
embedding example program is here, largely taken from Python docs:
https://gist.github.com/jmccardle/f3f19d3753ae023aa52b927f0d181c43
I'm simply not interested in writing in Lua, so regardless of any
particul
On 2021-11-24 07:59, Arnaud Loonstra wrote:
On 24-11-2021 01:46, MRAB wrote:
On 2021-11-23 20:25, Arnaud Loonstra wrote:
On 23-11-2021 18:31, MRAB wrote:
On 2021-11-23 16:04, Arnaud Loonstra wrote:
On 23-11-2021 16:37, MRAB wrote:
On 2021-11-23 15:17, MRAB wrote:
On 2021-11-23 14:44, Arnau
On 24-11-2021 01:46, MRAB wrote:
On 2021-11-23 20:25, Arnaud Loonstra wrote:
On 23-11-2021 18:31, MRAB wrote:
On 2021-11-23 16:04, Arnaud Loonstra wrote:
On 23-11-2021 16:37, MRAB wrote:
On 2021-11-23 15:17, MRAB wrote:
On 2021-11-23 14:44, Arnaud Loonstra wrote:
On 23-11-2021 15:34, MRAB
On 2021-11-23 20:25, Arnaud Loonstra wrote:
On 23-11-2021 18:31, MRAB wrote:
On 2021-11-23 16:04, Arnaud Loonstra wrote:
On 23-11-2021 16:37, MRAB wrote:
On 2021-11-23 15:17, MRAB wrote:
On 2021-11-23 14:44, Arnaud Loonstra wrote:
On 23-11-2021 15:34, MRAB wrote:
On 2021-11-23 12:07, Arnaud
On 23-11-2021 18:31, MRAB wrote:
On 2021-11-23 16:04, Arnaud Loonstra wrote:
On 23-11-2021 16:37, MRAB wrote:
On 2021-11-23 15:17, MRAB wrote:
On 2021-11-23 14:44, Arnaud Loonstra wrote:
On 23-11-2021 15:34, MRAB wrote:
On 2021-11-23 12:07, Arnaud Loonstra wrote:
Hi,
I've got Python embedd
On 2021-11-23 17:31, MRAB wrote:
On 2021-11-23 16:04, Arnaud Loonstra wrote:
[snip]
I would turn my attention to s_py_zosc function but I'm not sure. Since
the errors are GC related it could caused anywhere?
Basically, yes, but I won't be surprised if it was due to too few
INCREFs or too man
On 2021-11-23 16:04, Arnaud Loonstra wrote:
On 23-11-2021 16:37, MRAB wrote:
On 2021-11-23 15:17, MRAB wrote:
On 2021-11-23 14:44, Arnaud Loonstra wrote:
On 23-11-2021 15:34, MRAB wrote:
On 2021-11-23 12:07, Arnaud Loonstra wrote:
Hi,
I've got Python embedded successfully in a program up un
On 23-11-2021 16:37, MRAB wrote:
On 2021-11-23 15:17, MRAB wrote:
On 2021-11-23 14:44, Arnaud Loonstra wrote:
On 23-11-2021 15:34, MRAB wrote:
On 2021-11-23 12:07, Arnaud Loonstra wrote:
Hi,
I've got Python embedded successfully in a program up until now as I'm
now running into weird GC rela
On 2021-11-23 15:17, MRAB wrote:
On 2021-11-23 14:44, Arnaud Loonstra wrote:
On 23-11-2021 15:34, MRAB wrote:
On 2021-11-23 12:07, Arnaud Loonstra wrote:
Hi,
I've got Python embedded successfully in a program up until now as I'm
now running into weird GC related segfaults. I'm currently tryin
On 2021-11-23 14:44, Arnaud Loonstra wrote:
On 23-11-2021 15:34, MRAB wrote:
On 2021-11-23 12:07, Arnaud Loonstra wrote:
Hi,
I've got Python embedded successfully in a program up until now as I'm
now running into weird GC related segfaults. I'm currently trying to
debug this but my understandi
On 23-11-2021 15:34, MRAB wrote:
On 2021-11-23 12:07, Arnaud Loonstra wrote:
Hi,
I've got Python embedded successfully in a program up until now as I'm
now running into weird GC related segfaults. I'm currently trying to
debug this but my understanding of CPython limits me here.
I'm creating a
On 2021-11-23 12:07, Arnaud Loonstra wrote:
Hi,
I've got Python embedded successfully in a program up until now as I'm
now running into weird GC related segfaults. I'm currently trying to
debug this but my understanding of CPython limits me here.
I'm creating a Tuple in C but it crashes on crea
On 23-11-2021 13:07, Arnaud Loonstra wrote:
Hi,
I've got Python embedded successfully in a program up until now as I'm
now running into weird GC related segfaults. I'm currently trying to
debug this but my understanding of CPython limits me here.
I'm creating a Tuple in C but it crashes on c
Hi,
I've got Python embedded successfully in a program up until now as I'm
now running into weird GC related segfaults. I'm currently trying to
debug this but my understanding of CPython limits me here.
I'm creating a Tuple in C but it crashes on creating it after a while.
It doesn't make se
On Thu, Jun 3, 2021 at 4:05 AM Faraaz Mohammed wrote:
>
> On Tuesday, 1 July 2008 at 21:37:49 UTC+5:30, mk wrote:
> > Carsten Haese wrote:
> > > python_code is a C string containing the raw bytes from your pyc file.
> > > Casting that to a PyObject pointer will not magically transform it into
> >
On Tuesday, 1 July 2008 at 21:37:49 UTC+5:30, mk wrote:
> Carsten Haese wrote:
> > python_code is a C string containing the raw bytes from your pyc file.
> > Casting that to a PyObject pointer will not magically transform it into
> > a Python code object.
> well yeah, I kind of didn't think that
On Tuesday, July 23, 2019 at 2:20:45 PM UTC-6, Stefan Behnel wrote:
> Jesse Ibarra schrieb am 22.07.19 um 18:12:
> > On Saturday, July 20, 2019 at 1:11:51 PM UTC-6, Stefan Behnel wrote:
> >> Jesse Ibarra schrieb am 20.07.19 um 04:12:
> >>> Sorry, I am not understanding. Smalltlak VW 8.3 does not su
Jesse Ibarra schrieb am 22.07.19 um 18:12:
> On Saturday, July 20, 2019 at 1:11:51 PM UTC-6, Stefan Behnel wrote:
>> Jesse Ibarra schrieb am 20.07.19 um 04:12:
>>> Sorry, I am not understanding. Smalltlak VW 8.3 does not support Python.
>>> I can only call Pyhton code through C/Python API.
>>
>> Ok
On Saturday, July 20, 2019 at 1:11:51 PM UTC-6, Stefan Behnel wrote:
> Jesse Ibarra schrieb am 20.07.19 um 04:12:
> > Sorry, I am not understanding. Smalltlak VW 8.3 does not support Python.
> > I can only call Pyhton code through C/Python API.
>
> Ok, but that doesn't mean you need to write code
Jesse Ibarra schrieb am 20.07.19 um 04:12:
> Sorry, I am not understanding. Smalltlak VW 8.3 does not support Python.
> I can only call Pyhton code through C/Python API.
Ok, but that doesn't mean you need to write code that uses the C-API of
Python. All you need to do is:
1) Start up a CPython ru
Jesse Ibarra writes:
> ...
> Now ,I need to bring in shared libraries using C/Python API using Smalltalk.
> It seems like I can't directly bring in C shared libraries (.so files).
> PROBLEM.
With Python, you typically do not load ("bring in") shared libraries
explicitly; instead, you simply imp
Sorry, I am not understanding. Smalltlak VW 8.3 does not support Python. I can
only call Pyhton code through C/Python API.
--
https://mail.python.org/mailman/listinfo/python-list
mporting a module is just
"import module", and it even adapts to different Python versions
automatically). You can keep writing Python code, and at the same time
trivially use external C code.
https://cython.org/
http://docs.cython.org/en/latest/src/tutorial/
For embedding Python in an ex
Am 19.07.19 um 16:26 schrieb Jesse Ibarra:
On Friday, July 19, 2019 at 8:17:43 AM UTC-6, Chris Angelico wrote:
On Sat, Jul 20, 2019 at 12:16 AM Jesse Ibarra
wrote:
On Thursday, July 18, 2019 at 2:01:39 PM UTC-6, Chris Angelico wrote:
On Fri, Jul 19, 2019 at 5:51 AM Christian Gollwitzer wrot
On Friday, July 19, 2019 at 8:17:43 AM UTC-6, Chris Angelico wrote:
> On Sat, Jul 20, 2019 at 12:16 AM Jesse Ibarra
> wrote:
> >
> > On Thursday, July 18, 2019 at 2:01:39 PM UTC-6, Chris Angelico wrote:
> > > On Fri, Jul 19, 2019 at 5:51 AM Christian Gollwitzer
> > > wrote:
> > > > Once you can
On Thursday, July 18, 2019 at 1:46:05 PM UTC-6, Christian Gollwitzer wrote:
> Am 18.07.19 um 16:18 schrieb Jesse Ibarra:
> > On Wednesday, July 17, 2019 at 2:20:51 PM UTC-6, Christian Gollwitzer wrote:
> >> What level of integration do you want to achieve? Do you want
> >>
> >> a) to call Python fu
On Sat, Jul 20, 2019 at 12:16 AM Jesse Ibarra
wrote:
>
> On Thursday, July 18, 2019 at 2:01:39 PM UTC-6, Chris Angelico wrote:
> > On Fri, Jul 19, 2019 at 5:51 AM Christian Gollwitzer
> > wrote:
> > > Once you can do this, you can proceed to call a Python function, which
> > > in C means that yo
On Thursday, July 18, 2019 at 2:01:39 PM UTC-6, Chris Angelico wrote:
> On Fri, Jul 19, 2019 at 5:51 AM Christian Gollwitzer wrote:
> > Once you can do this, you can proceed to call a Python function, which
> > in C means that you invoke the function PyObject_CallObject(). A basic
> > example is s
On Fri, Jul 19, 2019 at 5:51 AM Christian Gollwitzer wrote:
> Once you can do this, you can proceed to call a Python function, which
> in C means that you invoke the function PyObject_CallObject(). A basic
> example is shown here:
>
> https://docs.python.org/2/extending/embedding.html#pure-embeddi
Am 18.07.19 um 16:18 schrieb Jesse Ibarra:
On Wednesday, July 17, 2019 at 2:20:51 PM UTC-6, Christian Gollwitzer wrote:
What level of integration do you want to achieve? Do you want
a) to call Python functions from Smalltalk
b) call Smalltalk functions from Python
c) pass callbacks around, e.g.
On Wednesday, July 17, 2019 at 2:20:51 PM UTC-6, Christian Gollwitzer wrote:
> Am 17.07.19 um 20:39 schrieb Jesse Ibarra:
> > My options seem rather limited, I need to make a Pipeline from (Smalltalk
> > -> C -> Python) then go back (Smalltalk <- C <- Python). Since Smalltalk
> > does not support
> On 17 Jul 2019, at 19:39, Jesse Ibarra wrote:
>
> On Wednesday, July 17, 2019 at 11:55:28 AM UTC-6, Barry Scott wrote:
>>> On 17 Jul 2019, at 16:57, wrote:
>>>
>>> I am using Python3.6:
>>>
>>> [jibarra@redsky ~]$ python3.6
>>> Python 3.6.8 (default, Apr 25 2019, 21:02:35)
>>> [GCC 4.8.5
Jesse Ibarra writes:
> ...
> My options seem rather limited, I need to make a Pipeline from (Smalltalk ->
> C -> Python) then go back (Smalltalk <- C <- Python). Since Smalltalk does
> not support Python directly I have to settle with the C/Python API
> (https://docs.python.org/3.6/extending/em
Am 17.07.19 um 20:39 schrieb Jesse Ibarra:
My options seem rather limited, I need to make a Pipeline from (Smalltalk -> C ->
Python) then go back (Smalltalk <- C <- Python). Since Smalltalk does not support
Python directly I have to settle with the C/Python API
(https://docs.python.org/3.6/ext
On Wednesday, July 17, 2019 at 11:55:28 AM UTC-6, Barry Scott wrote:
> > On 17 Jul 2019, at 16:57, wrote:
> >
> > I am using Python3.6:
> >
> > [jibarra@redsky ~]$ python3.6
> > Python 3.6.8 (default, Apr 25 2019, 21:02:35)
> > [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux
> > Type "help", "
> On 17 Jul 2019, at 16:57, jesse.ibarra.1...@gmail.com wrote:
>
> I am using Python3.6:
>
> [jibarra@redsky ~]$ python3.6
> Python 3.6.8 (default, Apr 25 2019, 21:02:35)
> [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux
> Type "help", "copyright", "credits" or "license" for more information
I am using Python3.6:
[jibarra@redsky ~]$ python3.6
Python 3.6.8 (default, Apr 25 2019, 21:02:35)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux
Type "help", "copyright", "credits" or "license" for more information.
I am
referencing:https://docs.python.org/3.6/extending/embedding.html#beyond
If nothing works mentioned above, please try building your application from
common path. ( not from c:\users\ ). While working on office
environment, this has impact.
--
https://mail.python.org/mailman/listinfo/python-list
Hi,
I'm trying to wrap my head around an OSX app which has python embedded.
This works fine if I run the build on the same machine as it is build on.
However when using Travis to build the app I can only get it to run from
the terminal. A double click on the appdir (or using open) results in
Hello,
I'm messing around with the embedded python and I can get parts to work. What
I'm having a hard time is getting my head around calling a function in the
python string and getting it's result.
Question, how do I load the python script and call runMe() and get it's value?
Thanks!
Example
Thanks for your help.
>
> >
> > I am working on embedding Python in my application.
>
> You forgot to tell us the version of Python that you're embedding.
>
> I am using Python2.7.
> > I have redirected sys.stdin and sys.stdout to call methods from a Qt
&
On Fri, Jan 6, 2017 at 1:06 AM, H Krishnan wrote:
> I tried replacing sys.displayhook with a function that does not print
> newline but the newline still got inserted. So, I am not sure where the
> newline is coming from. In any case, I could override sys.displayhook to add
> a newline at the end
Hello Mr.Eryk,
Thanks for the detailed explanation. After I added attribute support to my
extension class for stdio, the problem was resolved.
Regards,
Krishnan
On Fri, Jan 6, 2017 at 9:24 AM, eryk sun wrote:
> On Fri, Jan 6, 2017 at 1:06 AM, H Krishnan wrote:
> > I tried replacing sys.disp
On Thu, Jan 5, 2017 at 7:09 AM, H Krishnan wrote:
>
> I am working on embedding Python in my application.
You forgot to tell us the version of Python that you're embedding.
> I have redirected sys.stdin and sys.stdout to call methods from a Qt TextEdit
> widget. Everything
Hello Mr.Eryk,
Thanks for the detailed explanation. After I added attribute support to my
extension class for stdio, the problem was resolved.
Regards,
Krishnan
On Fri, Jan 6, 2017 at 9:24 AM, eryk sun wrote:
> On Fri, Jan 6, 2017 at 1:06 AM, H Krishnan wrote:
> > I tried replacing sys.displ
On Fri, Jan 6, 2017 at 1:06 AM, H Krishnan wrote:
> I tried replacing sys.displayhook with a function that does not print
> newline but the newline still got inserted. So, I am not sure where the
> newline is coming from. In any case, I could override sys.displayhook to add
> a newline at the end
Thanks for your help.
>
> >
> > I am working on embedding Python in my application.
>
> You forgot to tell us the version of Python that you're embedding.
>
> I am using Python2.7.
> > I have redirected sys.stdin and sys.stdout to call methods from a Qt
&
On Thu, Jan 5, 2017 at 7:09 AM, H Krishnan wrote:
>
> I am working on embedding Python in my application.
You forgot to tell us the version of Python that you're embedding.
> I have redirected sys.stdin and sys.stdout to call methods from a Qt TextEdit
> widget. Everything
Hi,
I am working on embedding Python in my application. I have redirected
sys.stdin and sys.stdout to call methods from a Qt TextEdit widget.
Everything works fine except that the Python prompt does not always come in
a new line:
>>> dir()
['__builtins__', '__doc__
On 11/13/2016 08:40 PM, Kaylen Wheeler wrote:
> I wonder if Lua would be a better option. Does it suffer from the
> same sandboxing issues that python does?
Lua was designed for this sort of thing and it can be secured and sandboxed.
--
https://mail.python.org/mailman/listinfo/python-list
dom, you may find it easier to
turn the problem around -- instead of embedding Python
in the game, embed the game in Python. Implement the
game engine as a Python extension module, where the
game objects are all inherently Python objects, and
Python is responsible for all of the lifetime manag
I wonder if Lua would be a better option. Does it suffer from the same
sandboxing issues that python does?
On Sunday, 13 November 2016 17:38:23 UTC-8, Nathan Ernst wrote:
> In regards to performance of Lua vs Python, I don't have enough (near zero
> experience) with Lua to comment there.
>
> B
In regards to performance of Lua vs Python, I don't have enough (near zero
experience) with Lua to comment there.
But in regards to embedding in a game, the only experience I have w/ Python
being embedded is while working on modding Civilization IV. What I saw
there just made me nauseous.
The rea
ending Python with C and
embedding Python in C. The principles are the same.
The hardest part about integrating Python is that you have to consider
what kinds of primitives from your C program you want to expose to
Python and how you intend to expose them. You'll have to use the C api
to wr
On Mon, Nov 14, 2016 at 11:40 AM, Steve D'Aprano
wrote:
> On Mon, 14 Nov 2016 12:23 am, Chris Angelico wrote:
>
>> Python without its stdlib is a disappointingly featureless
>> language :)
>
>
> I don't think that's true. You can do a lot in Python without any imports in
> your code:
>
> - basic s
On Mon, 14 Nov 2016 12:23 am, Chris Angelico wrote:
> Python without its stdlib is a disappointingly featureless
> language :)
I don't think that's true. You can do a lot in Python without any imports in
your code:
- basic string processing
- BigNum (int) and float arithmetic
- lists and tuples
re you intending to let untrusted
or less trusted people write the scripts? If so, *do not* use Python.
Embedding Python can be done to make your work easier, but it isn't
sandboxed.
> 1. What's the best implementation to use?
> - The engine itself is written in pure C,
kfjwhee...@gmail.com writes:
> A friend of mine is developing a game engine, and I would like to
> extend the engine by adding some scripting functionality.
I haven't done it myself. But the Python Wiki has some pages that will
help you, I think:
* https://wiki.python.org/moin/AppsWithPythonScr
(Sorry about the last post, my finger slipped before I was finished, and I
can't delete it for some reason.)
A friend of mine is developing a game engine, and I would like to extend the
engine by adding some scripting functionality. However, there's a lot of
information out there, and I have
A friend of mine is developing a game engine, and I would like to extend the
engine by adding some scripting functionality. However, there's a lot of
information out there
--
https://mail.python.org/mailman/listinfo/python-list
>
> However, I am having great trouble getting Py_Initialize() to work in the
> both CDT and Visual Studio 2015. I have as a starting point a simple C
> program that prints hello world then calls py_initialize and then prints
> another line of text to the screen. Calling Py_initialize causes th
Good morning!
I have been working with Python for the last few months. I have created a
script that I want to embed into a C++ environment, specifically CDT for
eclipse. I have read the https://docs.python.org/2/extending/index.html and
understand the ideas and differences between the two langu
Hi python-list,
I'm embedding Python in an application and I have encountered two crashes while
calling built-in functions that expect a top-level frame. See the following bug
reports: http://bugs.python.org/issue21563 and
http://bugs.python.org/issue21418. The problem is that the wor
On 2/5/2013 10:23 AM, Duncan Booth wrote:
Bas wrote:
A) Implement the main program in C. In a loop, get a chunk of data
using direct call of C functions, convert data to python variables and
call an embedded python interpreter that runs one iteration of the
user's algorithm. When the script fi
Bas, 05.02.2013 16:10:
> at work, we are thinking to replace some legacy application, which is a
> home-grown scripting language for monitoring and controlling a large
> experiment. It is able to read live data from sensors, do some simple
> logic and calculations, send commands to other subsystems
On Feb 5, 8:10 pm, Bas wrote:
> Since all the functions I have to interface with (read and write of live
> data, sending
> commands, ...) are implemented in C, the solution will require writing both C
> and python.
Standard embedding/extending is ok when the interface is 'thin' ie the
number of
urn the external
code into a library, use ctypes to call the library and you're done. That
also means reading command line arguments and/or config files can be done
in Python and keep the C code simpler.
Embedding Python isn't hard but it sounds more complex than needed here.
You can of
Hi Group,
at work, we are thinking to replace some legacy application, which is a
home-grown scripting language for monitoring and controlling a large
experiment. It is able to read live data from sensors, do some simple logic and
calculations, send commands to other subsystems and finally gene
Thank you, everyone, for your suggestions. I'll try them all and
decide which I like best.
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 17 Jun 2011 22:15:57 +0200, Hans Mulder said:
> On 17/06/11 19:47:50, Timo Lindemann wrote:
>> On Fri, 17 Jun 2011 00:57:25 +, Jason Friedman said:
>>
>>
>>
>>> but for various reasons I want a single script. Any alternatives?
>>
>> you can use a here document like this:
> That does n
On 17/06/11 19:47:50, Timo Lindemann wrote:
On Fri, 17 Jun 2011 00:57:25 +, Jason Friedman said:
but for various reasons I want a single script. Any alternatives?
you can use a here document like this:
#! /bin/bash
/usr/bin/python2<< EOPYTHON
def hello():
print("Hello, Worl
On Fri, 17 Jun 2011 00:57:25 +, Jason Friedman said:
>
> but for various reasons I want a single script. Any alternatives?
you can use a here document like this:
#! /bin/bash
/usr/bin/python2 << EOPYTHON
def hello():
print("Hello, World");
if __name__ == "__main__":
hel
rusi wrote:
> On Jun 17, 6:05 am, Chris Angelico wrote:
>
>> > Python call becomes. I'd prefer something like:
>>
>> #!/bin/bash
>> for i in 1 2 3 4; do
>> python -c "if True:
> # comfortably indented python code
>
> Thanks. Nice!
You can use bash here document feature, <<-, that strips hea
On Jun 17, 6:05 am, Chris Angelico wrote:
> > Python call becomes. I'd prefer something like:
>
> #!/bin/bash
> for i in 1 2 3 4; do
> python -c "if True:
# comfortably indented python code
Thanks. Nice!
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, Jun 17, 2011 at 10:57 AM, Jason Friedman wrote:
> The code behaves as I expect and want, but the de-denting of the
> Python call is unattractive, especially unattractive the longer the
> Python call becomes. I'd prefer something like:
>
#!/bin/bash
for i in 1 2 3 4; do
python -c "if Tr
$ cat test.sh
#!/bin/bash
for i in 1 2 3 4; do
python -c "
for j in range($i):
print j
"
done
$ sh test.sh
0
0
1
0
1
2
0
1
2
3
The code behaves as I expect and want, but the de-denting of the
Python call is unattractive, especially unattractive the longer the
Python call becomes. I'd prefe
On Fri, May 27, 2011 at 12:45 PM, Ned Deily wrote:
>
> The discussion in http://bugs.python.org/issue4434 might be of some help.
Thanks Ned! That was most helpful. I'm still not sure exactly what I
changed, but between building with --enable-shared and some fiddling
with how I link my program, I'
In article ,
Chris Angelico wrote:
> Still trying to sort this out, trying various things. If I configure
> --enable-shared, I get a different ImportError: 'libpython3.3m.so.1.0:
> cannot open shared object file: No such file or directory'. That file
> exists in ~/cpython, but sudo make install d
Still trying to sort this out, trying various things. If I configure
--enable-shared, I get a different ImportError: 'libpython3.3m.so.1.0:
cannot open shared object file: No such file or directory'. That file
exists in ~/cpython, but sudo make install doesn't put it anywhere
else. Pointing LD_LIBR
Followup. I'm now using Python 3.3 straight from Mercurial, and am
seeing the same issues. I've managed to get the compilation step to
succeed by naming the library for full inclusion and adding -lutil
-ldl (sounding rather Donizetti there), and my program runs. However,
it's unable to import all i
I'm starting to feel incredibly stupid here. Hopefully someone can
point out a really obvious thing that I've missed, thus enabling me to
move forward!
Up until now, I've been embedding Python 2.6.6 in my C++ program, by
compiling with "-I/usr/include/python2.6 -lpython2.6&quo
On Mon, Mar 28, 2011 at 4:18 PM, Chris Angelico wrote:
[...]
> Obviously I could use PyObject_Str() and PyString_Size() to get a
> decent figure, but that seems like overkill.
>
> What I'm hoping for is some simple function that zips through a
> complex object and sums its approximate memory usage
On Tue, Mar 29, 2011 at 12:03 PM, Jerry Hill wrote:
> On Mon, Mar 28, 2011 at 8:26 PM, Chris Angelico wrote:
>> Based on the docs and http://code.activestate.com/recipes/577504/ I
>> understand that to be non-recursive. I'm guessing then that there
>> isn't a recursive version, and that it's best
On Mon, Mar 28, 2011 at 8:26 PM, Chris Angelico wrote:
> Based on the docs and http://code.activestate.com/recipes/577504/ I
> understand that to be non-recursive. I'm guessing then that there
> isn't a recursive version, and that it's best to recurse myself?
Yes, you're right. I completely miss
On Tue, Mar 29, 2011 at 10:56 AM, Jerry Hill wrote:
> For python 2.6 and later, sys.getsizeof() will probably do what you
> want. It relies on objects implementing a __sizeof__() method, so
> third-party objects may or may not support this, but since you're
> looking at dicts and lists, you shoul
On Mon, Mar 28, 2011 at 7:18 PM, Chris Angelico wrote:
> I have an application that embeds Python to allow third-party
> scripting. The Python code returns data to the application in the form
> of a list or dictionary, and I'd like to have a quick check on the
> size of the outputted object before
me sort of "if this ran out of references now, how much
memory would be freed" function, that would be awesome.
My code is in C++, is embedding Python 2.6.6, and is running on Ubuntu
Linux. If the solution is to move to Python 3.x then this may be an
option.
Hoping there's somethin
On Feb 28, 4:57 pm, Mathieu CLERICI wrote:
> Hi,
>
> I'm trying to embed python in a c++ program.
> I have compiled python32.lib with msvc 2010 targetting 32bits, i link
> it with my program wich is also 32bit.
> I get an error when calling Py_Initialize() : "no codec search
> functions registered
Precisions : I'm trying to embed python 3.2 release.
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I'm trying to embed python in a c++ program.
I have compiled python32.lib with msvc 2010 targetting 32bits, i link
it with my program wich is also 32bit.
I get an error when calling Py_Initialize() : "no codec search
functions registered: can't find encoding"
Py_FileSystemDefaultEncoding val
Hi i am a new member on this list and thought if some people may be able
to enlighten me to the error below ?
I am running 64 bit ubuntu 10.10 and python 2.6 in case there are know
issues with this
setup, basically i am embedding python inside a c application i managed
to get this to work i can
[posted & e-mailed]
In article ,
tinau...@libero.it wrote:
>
>i'm trying to embed python in a c++ code.i'm starting with the example in the
>tutorial.i've problem with setting up the enveiroment.
>I've installed python with the distributed version (i.e., i did not, as a
>start, build it myself)
option,but then to that message, another is
added for the object file
file was built for i386 which is not the architecture being linked (x86_64)
>Messaggio originale
>Da: tinau...@libero.it
>Data: 29/09/2010 16.06
>A:
>Ogg: embedding python in macOS 10.6
>
>hi th
hi there,
i'm trying to embed python in a c++ code.i'm starting with the example in the
tutorial.i've problem with setting up the enveiroment.
I've installed python with the distributed version (i.e., i did not, as a
start, build it myself); i added the library where both python.h and pyconfig
Thanks for the reply. I'm checking this out today.
On Wed, 2 Jun 2010 22:30:37 -0700 (PDT), Carl Banks
wrote:
>On Jun 2, 1:46 pm, Paul Grunau wrote:
>> I have a problem with embedding Python into a C extension in Windows
>> Vista. I have implemented a timer routine in C as
Thanks for the reply. I'm looking into the Global Interpreter Lock
today.
On Thu, 03 Jun 2010 01:07:39 +0100, MRAB
wrote:
>p...@mail.python.org wrote:
>> I have a problem with embedding Python into a C extension in Windows
>> Vista. I have implemented a timer routine in C as
On Jun 2, 1:46 pm, Paul Grunau wrote:
> I have a problem with embedding Python into a C extension in Windows
> Vista. I have implemented a timer routine in C as an extension, which
> I can import into Python 2.6.5 and run. Each timer interval, the
> extension calls a C CALLBACK functio
p...@mail.python.org wrote:
I have a problem with embedding Python into a C extension in Windows
Vista. I have implemented a timer routine in C as an extension, which
I can import into Python 2.6.5 and run. Each timer interval, the
extension calls a C CALLBACK function. I want to be able to have
I have a problem with embedding Python into a C extension in Windows
Vista. I have implemented a timer routine in C as an extension, which
I can import into Python 2.6.5 and run. Each timer interval, the
extension calls a C CALLBACK function. I want to be able to have this
CALLBACK function call a
1 - 100 of 330 matches
Mail list logo